Skip to content

Commit

Permalink
[Fuzzing] fix harness (#156)
Browse files Browse the repository at this point in the history
Signed-off-by: Arjun Singh <[email protected]>
  • Loading branch information
0x34d authored Jul 27, 2023
1 parent 9114067 commit fe1e8f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fuzzing/inihfuzz.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,13 @@ extern int LLVMFuzzerTestOneInput(const char *Data, size_t Size) {

int ret;
*Prev_section = '\0';
int u = 100;

char *data = malloc(Size + 1);
memcpy(data, Data, Size);
data[Size] = '\0';

ret = ini_parse(data, dumper, NULL);
ret = ini_parse(data, dumper, &u);

free(data);

Expand Down

0 comments on commit fe1e8f8

Please sign in to comment.