summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_wireprotocol.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2014-06-18 14:42:46 +0800
committerXinchen Hui <laruence@php.net>2014-06-18 15:03:01 +0800
commit83d450c78de128da32048ef369d9769fa73be9da (patch)
tree9486f19bbf000e4bc1e29ae4ef6659eec8bcbaee /ext/mysqlnd/mysqlnd_wireprotocol.c
parent4c4dc8e2395598c6c1a3231ff9770dc1a8e381ea (diff)
downloadphp-git-83d450c78de128da32048ef369d9769fa73be9da.tar.gz
Fixed segfault of stream handling
Diffstat (limited to 'ext/mysqlnd/mysqlnd_wireprotocol.c')
-rw-r--r--ext/mysqlnd/mysqlnd_wireprotocol.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c
index e8237050dd..2eeebeed22 100644
--- a/ext/mysqlnd/mysqlnd_wireprotocol.c
+++ b/ext/mysqlnd/mysqlnd_wireprotocol.c
@@ -1760,24 +1760,30 @@ php_mysqlnd_rowp_read_text_protocol_aux(MYSQLND_MEMORY_POOL_CHUNK * row_buffer,
bit_area += 1 + sprintf((char *)start, "%ld", Z_LVAL_P(current_field));
//???? ZVAL_STRINGL(current_field, (char *) start, bit_area - start - 1, copy_data);
ZVAL_STRINGL(current_field, (char *) start, bit_area - start - 1);
+ /*
if (!copy_data) {
efree(start);
}
+ */
} else if (Z_TYPE_P(current_field) == IS_STRING){
memcpy(bit_area, Z_STRVAL_P(current_field), Z_STRLEN_P(current_field));
bit_area += Z_STRLEN_P(current_field);
*bit_area++ = '\0';
zval_dtor(current_field);
ZVAL_STRINGL(current_field, (char *) start, bit_area - start - 1);
+ /*
if (!copy_data) {
efree(start);
}
+ */
}
} else {
ZVAL_STRINGL(current_field, (char *)p, len);
+ /*
if (!copy_data) {
efree(p);
}
+ */
}
p += len;
last_field_was_string = TRUE;