php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #61359
Patch json.c.diff revision 2012-03-12 14:35 UTC by gopalv@php.net

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) {
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 08:01:30 2024 UTC