From 228b68bbab75ea6f892bbe4844d1f45eb3f6f8e9 Mon Sep 17 00:00:00 2001 From: Andrey Hristov Date: Mon, 1 Feb 2010 16:12:03 +0000 Subject: [PATCH] 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. --- ext/mysqlnd/mysqlnd_wireprotocol.c | 1 + 1 file changed, 1 insertion(+) 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) { -- 2.50.1