diff --git a/fuzzing/fuzz_uri_parse.c b/fuzzing/fuzz_uri_parse.c index e4687091b..d878b80cc 100644 --- a/fuzzing/fuzz_uri_parse.c +++ b/fuzzing/fuzz_uri_parse.c @@ -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 */ 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); if (uri == NULL)