fuzzing: Add more GUriFlags to the URI parsing test

Widen the amount of test coverage.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
Philip Withnall 2020-12-17 12:03:18 +00:00
parent 6723633fd7
commit 486a2cadbb

View File

@ -32,6 +32,12 @@ LLVMFuzzerTestOneInput (const unsigned char *data, size_t size)
nul_terminated_data = (unsigned char *) g_strndup ((const gchar *) data, size);
test_with_flags ((const gchar *) nul_terminated_data, G_URI_FLAGS_NONE);
test_with_flags ((const gchar *) nul_terminated_data, G_URI_FLAGS_PARSE_RELAXED);
test_with_flags ((const gchar *) nul_terminated_data, G_URI_FLAGS_NON_DNS);
test_with_flags ((const gchar *) nul_terminated_data, G_URI_FLAGS_HAS_AUTH_PARAMS);
test_with_flags ((const gchar *) nul_terminated_data, G_URI_FLAGS_HAS_PASSWORD);
test_with_flags ((const gchar *) nul_terminated_data, G_URI_FLAGS_ENCODED_QUERY);
test_with_flags ((const gchar *) nul_terminated_data, G_URI_FLAGS_ENCODED_PATH);
test_with_flags ((const gchar *) nul_terminated_data, G_URI_FLAGS_SCHEME_NORMALIZE);
g_free (nul_terminated_data);
return 0;