mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-25 08:36:52 +02:00
fuzzing: Use nul-terminated array introduced in previous commit
This fixes commit b2a6a9a434b29a70807dc9f811056318ff490bfa. Doh. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
f1a9599bcd
commit
0bf12c8bfa
@ -12,7 +12,7 @@ LLVMFuzzerTestOneInput (const unsigned char *data, size_t size)
|
|||||||
|
|
||||||
/* ignore @size (g_uri_parse() doesn’t support it); ensure @data is nul-terminated */
|
/* ignore @size (g_uri_parse() doesn’t support it); ensure @data is nul-terminated */
|
||||||
nul_terminated_data = (unsigned char *) g_strndup ((const gchar *) data, size);
|
nul_terminated_data = (unsigned char *) g_strndup ((const gchar *) data, size);
|
||||||
uri = g_uri_parse ((const gchar *) data, flags, NULL);
|
uri = g_uri_parse ((const gchar *) nul_terminated_data, flags, NULL);
|
||||||
g_free (nul_terminated_data);
|
g_free (nul_terminated_data);
|
||||||
|
|
||||||
if (uri == NULL)
|
if (uri == NULL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user