mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
@- Fixed mem-overwrite in XML_Parse_Into_Struct. (Thies)
(PHP xml_parse_into_struct) buffer was sometimes short by 1.
This commit is contained in:
parent
1f41ddfe7f
commit
b712c9360d
1 changed files with 1 additions and 1 deletions
|
@ -819,7 +819,7 @@ void _xml_characterDataHandler(void *userData, const XML_Char *s, int len)
|
|||
/* 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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue