com php-src: Improve fix for #74145: ext/wddx/wddx.c
| From: | Stanislav Malyshev | Date: | Wed, 05 Jul 2017 04:10:08 +0000 |
| Subject: | com php-src: Improve fix for #74145: ext/wddx/wddx.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-98344@lists.php.net to get a copy of this message | ||
Commit: f269cdcd4f76accbecd03884f327cffb9a7f1ca9
Author: Stanislav Malyshev <stas@php.net> Tue, 4 Jul 2017 21:10:08 -0700
Parents: e46d5896240012f5291fe3f730c76d5f0d124fe4
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f269cdcd4f76accbecd03884f327cffb9a7f1ca9
Log:
Improve fix for #74145
Bugs:
https://bugs.php.net/74145
Changed paths:
M ext/wddx/wddx.c
Diff:
diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c
index 41fdd3d..ee72ba2 100644
--- a/ext/wddx/wddx.c
+++ b/ext/wddx/wddx.c
@@ -799,18 +799,23 @@ static void php_wddx_push_element(void *user_data, const XML_Char *name, const
X
} else if (!strcmp(name, EL_BOOLEAN)) {
int i;
- ALLOC_ZVAL(ent.data);
- INIT_PZVAL(ent.data);
- Z_TYPE_P(ent.data) = IS_BOOL;
- ent.type = ST_BOOLEAN;
- SET_STACK_VARNAME;
if (atts) for (i = 0; atts[i]; i++) {
if (!strcmp(atts[i], EL_VALUE) && atts[i+1] && atts[i+1][0]) {
+ ALLOC_ZVAL(ent.data);
+ INIT_PZVAL(ent.data);
+ Z_TYPE_P(ent.data) = IS_BOOL;
+ ent.type = ST_BOOLEAN;
+ SET_STACK_VARNAME;
wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry));
php_wddx_process_data(user_data, atts[i+1], strlen(atts[i+1]));
break;
}
} else {
+ ALLOC_ZVAL(ent.data);
+ INIT_PZVAL(ent.data);
+ Z_TYPE_P(ent.data) = IS_BOOL;
+ ent.type = ST_BOOLEAN;
+ SET_STACK_VARNAME;
ZVAL_FALSE(ent.data);
wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry));
}