List:Commits« Previous MessageNext Message »
From:Chad MILLER Date:June 8 2007 9:06pm
Subject:bk commit into 5.0 tree (cmiller:1.2530)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of cmiller. When cmiller does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-06-08 17:06:29-04:00, cmiller@stripped +1 -0
  Merge zippy.cornsilk.net:/home/cmiller/work/mysql/41gca
  into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint-2
  MERGE: 1.1616.3034.3

  sql/sql_parse.cc@stripped, 2007-06-08 17:06:26-04:00, cmiller@stripped +0 -0
    Auto merged
    MERGE: 1.271.134.2

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	cmiller
# Host:	zippy.cornsilk.net
# Root:	/home/cmiller/work/mysql/mysql-5.0-maint-2/RESYNC

--- 1.623/sql/sql_parse.cc	2007-06-05 11:28:42 -04:00
+++ 1.624/sql/sql_parse.cc	2007-06-08 17:06:26 -04:00
@@ -1009,9 +1009,12 @@ static int check_connection(THD *thd)
     Old clients send null-terminated string as password; new clients send
     the size (1 byte) + string (not null-terminated). Hence in case of empty
     password both send '\0'.
+
+    Cast *passwd to an unsigned char, so that it doesn't extend the sign for
+    *passwd > 127 and become 2**32-127 after casting to uint.
   */
   uint passwd_len= thd->client_capabilities & CLIENT_SECURE_CONNECTION ?
-    *passwd++ : strlen(passwd);
+    (uchar)(*passwd++) : strlen(passwd);
   db= thd->client_capabilities & CLIENT_CONNECT_WITH_DB ?
     db + passwd_len + 1 : 0;
   uint db_len= db ? strlen(db) : 0;
Thread
bk commit into 5.0 tree (cmiller:1.2530)Chad MILLER8 Jun