mirror of
https://github.com/php/php-src.git
synced 2024-11-27 20:03:40 +08:00
fixed variable corruption under win x64
This commit is contained in:
parent
b3f6cc20e0
commit
95ea1e7ca7
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user