Skip to content

Commit

Permalink
Revert "[oss-fuzz] fuzzing support (#153)"
Browse files Browse the repository at this point in the history
This reverts commit 9114067.
  • Loading branch information
benhoyt committed Apr 24, 2024
1 parent e28a71f commit 53a7c05
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 65 deletions.
31 changes: 0 additions & 31 deletions fuzzing/OSS-FUZZ.MD

This file was deleted.

30 changes: 0 additions & 30 deletions fuzzing/inihfuzz.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ void parse(const char* fname) {
u++;
}

#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION

int main(int argc, char **argv)
{
if (argc < 2) {
Expand All @@ -52,31 +50,3 @@ int main(int argc, char **argv)
parse(argv[1]);
return 0;
}

#else

#define kMinInputLength 20
#define kMaxInputLength 1024

extern int LLVMFuzzerTestOneInput(const char *Data, size_t Size) {

if (Size < kMinInputLength || Size > kMaxInputLength) {
return 0;
}

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, &u);

free(data);

return ret;
}

#endif
4 changes: 0 additions & 4 deletions fuzzing/oss-fuzz.sh

This file was deleted.

0 comments on commit 53a7c05

Please sign in to comment.