summaryrefslogtreecommitdiff
path: root/ext/wddx
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2013-05-11 02:47:48 +0200
committerAnatol Belski <ab@php.net>2013-05-11 02:47:48 +0200
commit95ea1e7ca787537a93c25c401dba010d51aa8d59 (patch)
treeec256e03e5a5d420bf2e86102a4bb40db2e1cdb1 /ext/wddx
parentb3f6cc20e009e04695b6ce761222283c5af4dcdb (diff)
downloadphp-git-95ea1e7ca787537a93c25c401dba010d51aa8d59.tar.gz
fixed variable corruption under win x64
Diffstat (limited to 'ext/wddx')
-rw-r--r--ext/wddx/wddx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c
index 967da6a490..afeca90489 100644
--- a/ext/wddx/wddx.c
+++ b/ext/wddx/wddx.c
@@ -405,7 +405,7 @@ static void php_wddx_serialize_string(wddx_packet *packet, zval *var TSRMLS_DC)
if (Z_STRLEN_P(var) > 0) {
char *buf;
- int buf_len;
+ size_t buf_len;
buf = php_escape_html_entities(Z_STRVAL_P(var), Z_STRLEN_P(var), &buf_len, 0, ENT_QUOTES, NULL TSRMLS_CC);
@@ -626,12 +626,12 @@ static void php_wddx_serialize_array(wddx_packet *packet, zval *arr)
*/
void php_wddx_serialize_var(wddx_packet *packet, zval *var, char *name, int name_len TSRMLS_DC)
{
- char *tmp_buf;
- char *name_esc;
- int name_esc_len;
HashTable *ht;
if (name) {
+ size_t name_esc_len;
+ char *tmp_buf, *name_esc;
+
name_esc = php_escape_html_entities(name, name_len, &name_esc_len, 0, ENT_QUOTES, NULL TSRMLS_CC);
tmp_buf = emalloc(name_esc_len + sizeof(WDDX_VAR_S));
snprintf(tmp_buf, name_esc_len + sizeof(WDDX_VAR_S), WDDX_VAR_S, name_esc);