mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
591d8676ee
This will allow to further enhance the parsing, without breaking API, and also makes argument on call side a bit clearer than just TRUE/FALSE. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
21 lines
392 B
C
21 lines
392 B
C
#include "fuzz.h"
|
|
|
|
int
|
|
LLVMFuzzerTestOneInput (const unsigned char *data, size_t size)
|
|
{
|
|
GHashTable *parsed_params = NULL;
|
|
|
|
fuzz_set_logging_func ();
|
|
|
|
if (size > G_MAXSSIZE)
|
|
return 0;
|
|
|
|
parsed_params = g_uri_parse_params ((const gchar *) data, (gssize) size, "&", G_URI_PARAMS_NONE);
|
|
if (parsed_params == NULL)
|
|
return 0;
|
|
|
|
g_hash_table_unref (parsed_params);
|
|
|
|
return 0;
|
|
}
|