Skip to content

Commit 99a6877

Browse files
committed
Fix mbstring fuzzer
mb_ereg can throw now, so we need a dummy frame and need to free the exception afterwards.
1 parent cd05b56 commit 99a6877

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sapi/fuzzer/fuzzer-mbstring.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
3939
return 0;
4040
}
4141

42+
fuzzer_setup_dummy_frame();
43+
4244
args[0] = data;
4345
args[1] = "test123";
4446
fuzzer_call_php_func("mb_ereg", 2, args);
@@ -55,7 +57,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
5557
args[1] = data;
5658
fuzzer_call_php_func("mb_eregi", 2, args);
5759

58-
php_request_shutdown(NULL);
60+
fuzzer_request_shutdown();
5961

6062
free(data);
6163
#else

0 commit comments

Comments
 (0)