com php-src: Fix length reset in JSON parser: ext/json/JSON_p arser.c
| From: | Nikita Popov | Date: | Thu, 29 May 2014 10:53:32 +0000 |
| Subject: | com php-src: Fix length reset in JSON parser: ext/json/JSON_p arser.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-78632@lists.php.net to get a copy of this message | ||
Commit: bfff679d903c7ef1648d3d009f42566baa7d6232
Author: Nikita Popov <nikic@php.net> Thu, 29 May 2014 12:53:32 +0200
Parents: ccd9dab4c6f2d2df313b40705cf00a395fa4b080
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=bfff679d903c7ef1648d3d009f42566baa7d6232
Log:
Fix length reset in JSON parser
Changed paths:
M ext/json/JSON_parser.c
Diff:
diff --git a/ext/json/JSON_parser.c b/ext/json/JSON_parser.c
index c7fc6b4..116fc0c 100644
--- a/ext/json/JSON_parser.c
+++ b/ext/json/JSON_parser.c
@@ -712,7 +712,7 @@ parse_JSON_ex(JSON_parser jp, zval *z, unsigned short utf16_json[], int length,
jp->error_code = PHP_JSON_ERROR_SYNTAX;
return false;
}
- buf.s->len = 0;
+ if (buf.s) { buf.s->len = 0; }
JSON_RESET_TYPE();
}
break;