cvs: /php4/ext/xml xml.c
| From: | Thies C. Arntzen | Date: | Fri, 19 Nov 1999 14:11:46 +0000 |
| Subject: | cvs: /php4/ext/xml xml.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-6490@lists.php.net to get a copy of this message | ||
thies Fri Nov 19 09:11:46 1999 EDT
Modified files:
/php4/ext/xml xml.c
Log:
(PHP xml_parse_into_struct) buffer was sometimes short by 1.
Index: php4/ext/xml/xml.c
diff -u php4/ext/xml/xml.c:1.28 php4/ext/xml/xml.c:1.29
--- php4/ext/xml/xml.c:1.28 Wed Oct 20 10:58:03 1999
+++ php4/ext/xml/xml.c Fri Nov 19 09:11:15 1999
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: xml.c,v 1.28 1999/10/20 14:58:03 thies Exp $ */
+/* $Id: xml.c,v 1.29 1999/11/19 14:11:15 thies Exp $ */
#define IS_EXT_MODULE
#if COMPILE_DL
@@ -819,7 +819,7 @@
/* check if the current tag already has a value - if yes append to that! */
if
(zend_hash_find((*parser->ctag)->value.ht,"value",sizeof("value"),(void
**) &myval) == SUCCESS) {
int newlen = (*myval)->value.str.len + decoded_len;
- (*myval)->value.str.val = erealloc((*myval)->value.str.val,newlen);
+ (*myval)->value.str.val = erealloc((*myval)->value.str.val,newlen+1);
strcpy((*myval)->value.str.val + (*myval)->value.str.len,decoded_value);
(*myval)->value.str.len += decoded_len;
efree(decoded_value);