]> granicus.if.org Git - php/commitdiff
Fix a bug in mysqlnd where a pointer was not incremented
authorAndrey Hristov <andrey@php.net>
Mon, 1 Feb 2010 16:12:03 +0000 (16:12 +0000)
committerAndrey Hristov <andrey@php.net>
Mon, 1 Feb 2010 16:12:03 +0000 (16:12 +0000)
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

index c2ceec6bb515934d87ff676cff57eb457cd74447..11a1191ee5af53d8e53742f14169ccb215063e45 100644 (file)
@@ -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) {