andrey                                   Mon, 01 Feb 2010 17:12:40 +0000

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

Log:
Fix second bug in that code, + instead of += thus not increasing
a pointer and mangling data. Again, ext/mysql and ext/mysqli doesn't
have access to this codepath.

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 16:21:56 UTC (rev 294316)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_wireprotocol.c     
2010-02-01 17:12:40 UTC (rev 294317)
@@ -956,7 +956,7 @@
        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++;
        }


Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.c        2010-02-01 
16:21:56 UTC (rev 294316)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_wireprotocol.c        2010-02-01 
17:12:40 UTC (rev 294317)
@@ -956,7 +956,7 @@
        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++;
        }


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

Reply via email to