Skip to content

Commit 5341ef7

Browse files
committed
Fixed the number of args
1 parent 24003b5 commit 5341ef7

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

sapi/fuzzer/fuzzer-bcmath.c

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,20 +73,15 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
7373

7474
fuzzer_setup_dummy_frame();
7575

76-
zval result;
77-
ZVAL_UNDEF(&result);
76+
zval args[3];
77+
ZVAL_STRINGL(&args[0], dividend_str, dividend_len);
78+
ZVAL_STRINGL(&args[1], divisor_str, divisor_len);
79+
ZVAL_LONG(&args[2], scale);
7880

79-
zval args[4];
80-
ZVAL_COPY_VALUE(&args[0], &result);
81-
ZVAL_STRINGL(&args[1], dividend_str, dividend_len);
82-
ZVAL_STRINGL(&args[2], divisor_str, divisor_len);
83-
ZVAL_LONG(&args[3], scale);
81+
fuzzer_call_php_func_zval("bcdiv", 3, args);
8482

85-
fuzzer_call_php_func_zval("bcdiv", 4, args);
86-
87-
zval_ptr_dtor(&result);
83+
zval_ptr_dtor(&args[0]);
8884
zval_ptr_dtor(&args[1]);
89-
zval_ptr_dtor(&args[2]);
9085
efree(dividend_str);
9186
efree(divisor_str);
9287

0 commit comments

Comments
 (0)