]> granicus.if.org Git - php/commitdiff
Fix second bug in that code, + instead of += thus not increasing
authorAndrey Hristov <andrey@php.net>
Mon, 1 Feb 2010 17:12:40 +0000 (17:12 +0000)
committerAndrey Hristov <andrey@php.net>
Mon, 1 Feb 2010 17:12:40 +0000 (17:12 +0000)
a pointer and mangling data. Again, ext/mysql and ext/mysqli doesn't
have access to this codepath.

ext/mysqlnd/mysqlnd_wireprotocol.c

index 11a1191ee5af53d8e53742f14169ccb215063e45..5710377882eacc2040837ed8171962d8fe95dc5f 100644 (file)
@@ -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++;
        }