com php-src: fix heap overflow warnings on win x64 debug crt: ext/soap/soap.c
| From: | Anatol Belski | Date: | Mon, 13 May 2013 12:24:21 +0000 |
| Subject: | com php-src: fix heap overflow warnings on win x64 debug crt: ext/soap/soap.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-72167@lists.php.net to get a copy of this message | ||
Commit: fe21accfb4913bf309f26894ae27e9ad34fb5260
Author: Anatol Belski <ab@php.net> Mon, 13 May 2013 14:24:21 +0200
Parents: d6505acbf5ff6db0e9e19cdba121183d9563bad5
Branches: PHP-5.3 PHP-5.4 PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fe21accfb4913bf309f26894ae27e9ad34fb5260
Log:
fix heap overflow warnings on win x64 debug crt
Changed paths:
M ext/soap/soap.c
Diff:
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index 6851a9b..942e09b 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -4142,7 +4142,7 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char
*function
if (version == SOAP_1_1) {
if (zend_hash_find(prop, "faultcode", sizeof("faultcode"), (void**)&tmp)
== SUCCESS) {
- int new_len;
+ size_t new_len;
xmlNodePtr node = xmlNewNode(NULL, BAD_CAST("faultcode"));
char *str = php_escape_html_entities((unsigned char*)Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp),
&new_len, 0, 0, NULL TSRMLS_CC);
xmlAddChild(param, node);
@@ -4152,7 +4152,7 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char
*function
xmlNodeSetContent(node, code);
xmlFree(code);
} else {
- xmlNodeSetContentLen(node, BAD_CAST(str), new_len);
+ xmlNodeSetContentLen(node, BAD_CAST(str), (int)new_len);
}
efree(str);
}
@@ -4167,7 +4167,7 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char
*function
detail_name = "detail";
} else {
if (zend_hash_find(prop, "faultcode", sizeof("faultcode"), (void**)&tmp)
== SUCCESS) {
- int new_len;
+ size_t new_len;
xmlNodePtr node = xmlNewChild(param, ns, BAD_CAST("Code"), NULL);
char *str = php_escape_html_entities((unsigned char*)Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp),
&new_len, 0, 0, NULL TSRMLS_CC);
node = xmlNewChild(node, ns, BAD_CAST("Value"), NULL);
@@ -4177,7 +4177,7 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char
*function
xmlNodeSetContent(node, code);
xmlFree(code);
} else {
- xmlNodeSetContentLen(node, BAD_CAST(str), new_len);
+ xmlNodeSetContentLen(node, BAD_CAST(str), (int)new_len);
}
efree(str);
}