mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-29 21:51:16 +00:00
nitrokey: Fix a buffer overrun spotted by Coverity
This only happens when debugging, so it was not spotted by valgrind.
This commit is contained in:
parent
9b0d228ed9
commit
3979ba5039
@ -120,8 +120,8 @@ _dump_to_console (const gchar *title, const guint8 *buf, gsize buf_sz)
|
|||||||
if (g_getenv ("NITROKEY_DEBUG") == NULL)
|
if (g_getenv ("NITROKEY_DEBUG") == NULL)
|
||||||
return;
|
return;
|
||||||
g_debug ("%s", title);
|
g_debug ("%s", title);
|
||||||
for (guint i = 0; i < 64; i++)
|
for (gsize i = 0; i < buf_sz; i++)
|
||||||
g_debug ("%u=0x%02x", i, buf[i]);
|
g_debug ("%" G_GSIZE_FORMAT "=0x%02x", i, buf[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
Loading…
Reference in New Issue
Block a user