mirror of
https://github.com/morgan9e/libfprint-fpc1020
synced 2026-04-14 00:14:16 +09: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