Patch json.c.diff for json Bug #61359
Patch version 2012-03-12 14:35 UTC
Return to Bug #61359 |
Download this patch
Patch Revisions:
Developer: gopalv@php.net
Index: ext/json/json.c
===================================================================
--- ext/json/json.c (revision 324155)
+++ ext/json/json.c (working copy)
@@ -354,6 +354,9 @@
if (len == 0) {
smart_str_appendl(buf, "\"\"", 2);
return;
+ } else {
+ size_t newlen;
+ smart_str_alloc(buf, len+2, 0);
}
if (options & PHP_JSON_NUMERIC_CHECK) {
|