summaryrefslogtreecommitdiff
path: root/ext/json/json_parser.y
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2015-01-01 19:19:31 +0000
committerJakub Zelenka <bukka@php.net>2015-01-01 19:19:31 +0000
commit8e102504494d49a9218d0948dc8a7de36753ebe5 (patch)
tree6cfffe6de548074ff05ba7bc4524376ae48471d2 /ext/json/json_parser.y
parent8c4c16d1c2cb983d7982409bf604ed1432aa96ac (diff)
downloadphp-git-8e102504494d49a9218d0948dc8a7de36753ebe5.tar.gz
Use ZVAL_COPY_VALUE for copying parser result to return_value
Diffstat (limited to 'ext/json/json_parser.y')
-rw-r--r--ext/json/json_parser.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/json/json_parser.y b/ext/json/json_parser.y
index 4af46ecbd1..1de6d6c747 100644
--- a/ext/json/json_parser.y
+++ b/ext/json/json_parser.y
@@ -85,7 +85,7 @@ void php_json_parser_array_append(zval *array, zval *zvalue);
%% /* Rules */
start:
- value PHP_JSON_T_EOI { $$ = $1; *parser->return_value = $1; PHP_JSON_USE($2); YYACCEPT; }
+ value PHP_JSON_T_EOI { $$ = $1; ZVAL_COPY_VALUE(parser->return_value, &$1); PHP_JSON_USE($2); YYACCEPT; }
| value errlex { PHP_JSON_USE_2($$, $1, $2); }
;