From: Andrey Hristov Date: Mon, 1 Feb 2010 16:12:03 +0000 (+0000) Subject: Fix a bug in mysqlnd where a pointer was not incremented X-Git-Tag: php-5.4.0alpha1~191^2~1996 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=228b68bbab75ea6f892bbe4844d1f45eb3f6f8e9;p=php Fix a bug in mysqlnd where a pointer was not incremented and thus wrong data was saved MYSQLND_FIELD::db. However, this wasn't caught because there is no code in mysql/mysqli/pdo_mysql which reads that field of the structure. The problem was found during code review. --- diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c index c2ceec6bb5..11a1191ee5 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.c +++ b/ext/mysqlnd/mysqlnd_wireprotocol.c @@ -957,6 +957,7 @@ php_mysqlnd_rset_field_read(void *_packet, MYSQLND *conn TSRMLS_DC) len = meta->db_length; meta->db = memcpy(root_ptr, meta->db, len); *(root_ptr + len) = '\0'; + root_ptr++; } if (meta->table && meta->table != mysqlnd_empty_string) {