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:
parent
422fc5facf
commit
744a71ce08
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue