From 9f5216d25933be783a8cea5ebdd026af3c536255 Mon Sep 17 00:00:00 2001 From: cpq Date: Thu, 24 Dec 2020 09:07:55 +0000 Subject: [PATCH] Add more fuzz tests --- test/fuzz.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/fuzz.c b/test/fuzz.c index 1fa9443d..90072fc4 100644 --- a/test/fuzz.c +++ b/test/fuzz.c @@ -35,5 +35,13 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { mg_base64_encode(data, size, buf); mg_base64_encode(NULL, 0, buf); + char *hexdump = mg_hexdump(data, len); + free(hexdump); + + mg_globmatch((char *) data, size, (char *) data, size); + + struct mg_str k, v, s = mg_str_n((char *) data, size); + while (mg_next_comma_entry(&s, &k, &v)) k.len = v.len = 0; + return 0; }