From: Xinchen Hui Date: Mon, 12 May 2014 02:46:19 +0000 (+0800) Subject: Fixed fields handling X-Git-Tag: POST_PHPNG_MERGE~383^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=618d6e273c1badd69ee46267c21e0ae6e7b907c4;p=php Fixed fields handling --- diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c index f25d71fb08..ad55652ee2 100644 --- a/ext/wddx/wddx.c +++ b/ext/wddx/wddx.c @@ -791,14 +791,14 @@ static void php_wddx_push_element(void *user_data, const XML_Char *name, const X while ((p2 = php_memnstr(p1, ",", sizeof(",")-1, endp)) != NULL) { key = estrndup(p1, p2 - p1); array_init(&tmp); - add_assoc_zval_ex(&ent.data, key, p2 - p1 + 1, &tmp); + add_assoc_zval_ex(&ent.data, key, p2 - p1, &tmp); p1 = p2 + sizeof(",")-1; efree(key); } if (p1 <= endp) { array_init(&tmp); - add_assoc_zval_ex(&ent.data, p1, endp - p1 + 1, &tmp); + add_assoc_zval_ex(&ent.data, p1, endp - p1, &tmp); } break;