com php-src: Merge branch 'PHP-5.6' into PHP-7.0: ext/wddx/wddx.c
| From: | Stanislav Malyshev | Date: | Tue, 06 Dec 2016 05:58:55 +0000 |
| Subject: | com php-src: Merge branch 'PHP-5.6' into PHP-7.0: ext/wddx/wddx.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-96195@lists.php.net to get a copy of this message | ||
Commit: 6292fe84d314bdb8504968084666a683983f8044
Author: Stanislav Malyshev <stas@php.net> Mon, 5 Dec 2016 21:58:55 -0800
Parents: a983b728a787360ff033bbf79ec3bd538b6aafb0 266ecb6d0a1ab5a37b4d652ca774a8adc4b06578
Branches: PHP-7.0 PHP-7.1 master
Link: http://git.php..net/?p=php-src.git;a=commitdiff;h=6292fe84d314bdb8504968084666a683983f8044
Log:
Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
Fix bug #73631 - Invalid read when wddx decodes empty boolean element
Bugs:
https://bugs.php.net/73631
Changed paths:
MM ext/wddx/wddx.c
Diff:
diff --cc ext/wddx/wddx.c
index b188e89,0cee16b..662b957
--- a/ext/wddx/wddx.c
+++ b/ext/wddx/wddx.c
@@@ -767,13 -804,20 +767,18 @@@ static void php_wddx_push_element(void
ent.type = ST_BOOLEAN;
SET_STACK_VARNAME;
- ALLOC_ZVAL(ent.data);
- INIT_PZVAL(ent.data);
- Z_TYPE_P(ent.data) = IS_BOOL;
+ ZVAL_TRUE(&ent.data);
wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry));
- php_wddx_process_data(user_data, atts[i+1], strlen(atts[i+1]));
+ php_wddx_process_data(user_data, atts[i+1], strlen((char *)atts[i+1]));
break;
}
+ } else {
+ ent.type = ST_BOOLEAN;
+ SET_STACK_VARNAME;
+ ZVAL_FALSE(&ent.data);
+ wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry));
}
- } else if (!strcmp(name, EL_NULL)) {
+ } else if (!strcmp((char *)name, EL_NULL)) {
ent.type = ST_NULL;
SET_STACK_VARNAME;