summaryrefslogtreecommitdiff
path: root/fuzzing/fuzz_uri_parse.c
diff options
context:
space:
mode:
authorPhilip Withnall <pwithnall@endlessos.org>2020-12-17 12:03:18 +0000
committerPhilip Withnall <pwithnall@endlessos.org>2020-12-17 12:03:18 +0000
commit486a2cadbb22a6d9cbb3620e67f9dc0381a22b02 (patch)
treeef615af548b192ed046724bfcdc309d87beea42b /fuzzing/fuzz_uri_parse.c
parent6723633fd7607aed8f8b74a3d96d1394de44e3bb (diff)
downloadglib-486a2cadbb22a6d9cbb3620e67f9dc0381a22b02.tar.gz
fuzzing: Add more GUriFlags to the URI parsing test
Widen the amount of test coverage. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Diffstat (limited to 'fuzzing/fuzz_uri_parse.c')
-rw-r--r--fuzzing/fuzz_uri_parse.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fuzzing/fuzz_uri_parse.c b/fuzzing/fuzz_uri_parse.c
index b9425934e..03c581ecb 100644
--- a/fuzzing/fuzz_uri_parse.c
+++ b/fuzzing/fuzz_uri_parse.c
@@ -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;