andrey                                   Mon, 01 Feb 2010 16:12:03 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=294313

Log:
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.

Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c
    U   php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.c

Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c     
2010-02-01 15:31:58 UTC (rev 294312)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c     
2010-02-01 16:12:03 UTC (rev 294313)
@@ -957,6 +957,7 @@
                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) {

Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.c        2010-02-01 
15:31:58 UTC (rev 294312)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.c        2010-02-01 
16:12:03 UTC (rev 294313)
@@ -957,6 +957,7 @@
                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) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to