8d87dc
From 95ea1e7ca787537a93c25c401dba010d51aa8d59 Mon Sep 17 00:00:00 2001
8d87dc
From: Anatol Belski <ab@php.net>
8d87dc
Date: Sat, 11 May 2013 02:47:48 +0200
8d87dc
Subject: [PATCH] fixed variable corruption under win x64
8d87dc
8d87dc
---
8d87dc
 ext/wddx/wddx.c | 8 ++++----
8d87dc
 1 file changed, 4 insertions(+), 4 deletions(-)
8d87dc
8d87dc
diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c
8d87dc
index 967da6a..afeca90 100644
8d87dc
--- a/ext/wddx/wddx.c
8d87dc
+++ b/ext/wddx/wddx.c
8d87dc
@@ -405,7 +405,7 @@ static void php_wddx_serialize_string(wddx_packet *packet, zval *var TSRMLS_DC)
8d87dc
 
8d87dc
 	if (Z_STRLEN_P(var) > 0) {
8d87dc
 		char *buf;
8d87dc
-		int buf_len;
8d87dc
+		size_t buf_len;
8d87dc
 
8d87dc
 		buf = php_escape_html_entities(Z_STRVAL_P(var), Z_STRLEN_P(var), &buf_len, 0, ENT_QUOTES, NULL TSRMLS_CC);
8d87dc
 
8d87dc
@@ -626,12 +626,12 @@ static void php_wddx_serialize_array(wddx_packet *packet, zval *arr)
8d87dc
  */
8d87dc
 void php_wddx_serialize_var(wddx_packet *packet, zval *var, char *name, int name_len TSRMLS_DC)
8d87dc
 {
8d87dc
-	char *tmp_buf;
8d87dc
-	char *name_esc;
8d87dc
-	int name_esc_len;
8d87dc
 	HashTable *ht;
8d87dc
 
8d87dc
 	if (name) {
8d87dc
+		size_t name_esc_len;
8d87dc
+		char *tmp_buf, *name_esc;
8d87dc
+
8d87dc
 		name_esc = php_escape_html_entities(name, name_len, &name_esc_len, 0, ENT_QUOTES, NULL TSRMLS_CC);
8d87dc
 		tmp_buf = emalloc(name_esc_len + sizeof(WDDX_VAR_S));
8d87dc
 		snprintf(tmp_buf, name_esc_len + sizeof(WDDX_VAR_S), WDDX_VAR_S, name_esc);
8d87dc
-- 
8d87dc
2.1.4
8d87dc