lib: misc static analysis fixes

This fixes a few warnings from coverity, none of which really
interesting.
This commit is contained in:
Luca BRUNO committed 2021-11-26 15:11:00 +00:00
1 parent 2dc6ec70ec
commit cefc1d7854
3 files changed
+4 -3

No files matched your search

+1
View File
@@ -44,6 +44,7 @@ corrupt (GBytes *input)
g_assert_cmpint (len, >, 0);
g_assert_cmpint (len, <, G_MAXINT);
g_autofree char *newbuf = g_memdup (buf, len);
g_assert (newbuf != NULL);
int o = g_random_int_range (0, len);
newbuf[o] = (newbuf[0] + 1);