From 0bf12c8bfa201c01c40e03cb35195b7809284578 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 30 Jun 2020 11:08:05 +0100 Subject: [PATCH] fuzzing: Use nul-terminated array introduced in previous commit This fixes commit b2a6a9a434b29a70807dc9f811056318ff490bfa. Doh. Signed-off-by: Philip Withnall --- fuzzing/fuzz_uri_parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)