Skip to content

Commit

Permalink
Improve fix for #74145
Browse files Browse the repository at this point in the history
  • Loading branch information
smalyshev committed Jul 5, 2017
1 parent e46d589 commit f269cdc
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions ext/wddx/wddx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit f269cdc

Please sign in to comment.