From: Andrey Hristov Date: Mon, 1 Feb 2010 17:12:40 +0000 (+0000) Subject: Fix second bug in that code, + instead of += thus not increasing X-Git-Tag: php-5.4.0alpha1~191^2~1994 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0e71a586628176e1e2750c03c25dc6e0e197ba23;p=php Fix second bug in that code, + instead of += thus not increasing a pointer and mangling data. Again, ext/mysql and ext/mysqli doesn't have access to this codepath. --- diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c index 11a1191ee5..5710377882 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.c +++ b/ext/mysqlnd/mysqlnd_wireprotocol.c @@ -956,7 +956,7 @@ php_mysqlnd_rset_field_read(void *_packet, MYSQLND *conn TSRMLS_DC) if (meta->db && meta->db != mysqlnd_empty_string) { len = meta->db_length; meta->db = memcpy(root_ptr, meta->db, len); - *(root_ptr + len) = '\0'; + *(root_ptr +=len) = '\0'; root_ptr++; }