List:Commits« Previous MessageNext Message »
From:Mattias Jonsson Date:November 23 2009 10:25am
Subject:bzr commit into mysql-5.6-next-mr-bugfixing branch
(mattias.jonsson:2956) Bug#48939
View as plain text  
#At file:///Users/mattiasj/clones/bzrroot/b48939-m-n-mr-bf/ based on revid:guilhem@stripped

 2956 Mattias Jonsson	2009-11-23
      Bug#48939: First character in error text replaced with Z on DBUG_EXTRA builds
      
      Bad strmake call (using too long length)
     @ sql/protocol.cc
        Bug#48939: First character in error text replaced with Z on DBUG_EXTRA builds
        
        Bad strmake call (using too long length)
        strmake may add an '\0' to the byte AFTER length too.

    modified:
      sql/protocol.cc
=== modified file 'sql/protocol.cc'
--- a/sql/protocol.cc	2009-10-23 11:22:21 +0000
+++ b/sql/protocol.cc	2009-11-23 10:24:58 +0000
@@ -411,8 +411,8 @@ bool net_send_error_packet(THD *thd, uin
                                            thd->variables.character_set_results,
                                            err, strlen(err),
                                            system_charset_info, &error);
-  length= (uint) (strmake((char*) pos, (char*)converted_err, MYSQL_ERRMSG_SIZE) -
-                  (char*) buff);
+  length= (uint) (strmake((char*) pos, (char*)converted_err,
+                           MYSQL_ERRMSG_SIZE - 1) - (char*) buff);
   err= (char*) buff;
   DBUG_RETURN(net_write_command(net,(uchar) 255, (uchar*) "", 0, (uchar*) err,
                                 length));


Attachment: [text/bzr-bundle]
Thread
bzr commit into mysql-5.6-next-mr-bugfixing branch(mattias.jonsson:2956) Bug#48939Mattias Jonsson23 Nov