Skip to content

Commit 8e10250

Browse files
committed
Use ZVAL_COPY_VALUE for copying parser result to return_value
1 parent 8c4c16d commit 8e10250

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/json/json_parser.y

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void php_json_parser_array_append(zval *array, zval *zvalue);
8585
%% /* Rules */
8686

8787
start:
88-
value PHP_JSON_T_EOI { $$ = $1; *parser->return_value = $1; PHP_JSON_USE($2); YYACCEPT; }
88+
value PHP_JSON_T_EOI { $$ = $1; ZVAL_COPY_VALUE(parser->return_value, &$1); PHP_JSON_USE($2); YYACCEPT; }
8989
| value errlex { PHP_JSON_USE_2($$, $1, $2); }
9090
;
9191

0 commit comments

Comments
 (0)