Import Upstream version 2.72.4
This commit is contained in:
commit
4ef3ff9793
2003 changed files with 1332420 additions and 0 deletions
19
fuzzing/fuzz_date_parse.c
Normal file
19
fuzzing/fuzz_date_parse.c
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#include "fuzz.h"
|
||||
|
||||
int
|
||||
LLVMFuzzerTestOneInput (const unsigned char *data, size_t size)
|
||||
{
|
||||
unsigned char *nul_terminated_data = NULL;
|
||||
GDate *date = g_date_new ();
|
||||
|
||||
fuzz_set_logging_func ();
|
||||
|
||||
/* ignore @size (g_date_set_parse() doesn’t support it); ensure @data is nul-terminated */
|
||||
nul_terminated_data = (unsigned char *) g_strndup ((const gchar *) data, size);
|
||||
g_date_set_parse (date, (const gchar *) nul_terminated_data);
|
||||
g_free (nul_terminated_data);
|
||||
|
||||
g_date_free (date);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue