mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
vfs301: Assert hex string has 2 or more characters
Otherwise static analysis thinks we may end up allocating a 0 byte output buffer.
This commit is contained in:
committed by
Benjamin Berg
parent
422fc5facf
commit
744a71ce08
@@ -177,6 +177,7 @@ translate_str (const char **srcL, gssize *len)
|
||||
src_len += tmp;
|
||||
}
|
||||
|
||||
g_assert (src_len >= 2);
|
||||
*len = src_len / 2;
|
||||
res = g_malloc0 (*len);
|
||||
dst = res;
|
||||
|
||||
Reference in New Issue
Block a user