Skip to content

Commit

Permalink
fuzz: add missing vips_init() call
Browse files Browse the repository at this point in the history
Non-functional change, previously the initialization occurred in
`LLVMFuzzerTestOneInput()` automatically via `vips_check_init()`.
  • Loading branch information
kleisauke committed Aug 19, 2024
1 parent 65a1371 commit f8ccf36
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fuzz/generic_buffer_fuzzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
extern "C" int
LLVMFuzzerInitialize(int *argc, char ***argv)
{
if (VIPS_INIT(*argv[0]))
return -1;

vips_concurrency_set(1);

#ifdef DEBUG
Expand Down
3 changes: 3 additions & 0 deletions fuzz/jpegsave_file_fuzzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
extern "C" int
LLVMFuzzerInitialize(int *argc, char ***argv)
{
if (VIPS_INIT(*argv[0]))
return -1;

vips_concurrency_set(1);
return 0;
}
Expand Down
3 changes: 3 additions & 0 deletions fuzz/mosaic_fuzzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ PACK(struct mosaic_opt {
extern "C" int
LLVMFuzzerInitialize(int *argc, char ***argv)
{
if (VIPS_INIT(*argv[0]))
return -1;

vips_concurrency_set(1);
return 0;
}
Expand Down
3 changes: 3 additions & 0 deletions fuzz/sharpen_fuzzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
extern "C" int
LLVMFuzzerInitialize(int *argc, char ***argv)
{
if (VIPS_INIT(*argv[0]))
return -1;

vips_concurrency_set(1);
return 0;
}
Expand Down
3 changes: 3 additions & 0 deletions fuzz/smartcrop_fuzzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
extern "C" int
LLVMFuzzerInitialize(int *argc, char ***argv)
{
if (VIPS_INIT(*argv[0]))
return -1;

vips_concurrency_set(1);
return 0;
}
Expand Down
3 changes: 3 additions & 0 deletions fuzz/thumbnail_fuzzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
extern "C" int
LLVMFuzzerInitialize(int *argc, char ***argv)
{
if (VIPS_INIT(*argv[0]))
return -1;

vips_concurrency_set(1);
return 0;
}
Expand Down

0 comments on commit f8ccf36

Please sign in to comment.