[Commits] Rev 2904: MBug#698132: Fix wrong buffer calculation in send_change_user_packet() in http://bazaar.launchpad.net/~maria-captains/maria/5.2

knielsen at knielsen-hq.org knielsen at knielsen-hq.org
Thu Jan 6 16:55:31 EET 2011


At http://bazaar.launchpad.net/~maria-captains/maria/5.2

------------------------------------------------------------
revno: 2904
revision-id: knielsen at knielsen-hq.org-20110106145529-hffzazfwnos4g0mc
parent: sergii at pisem.net-20101231093914-7nhg8p4chmn272zr
committer: knielsen at knielsen-hq.org
branch nick: mariadb-5.2
timestamp: Thu 2011-01-06 15:55:29 +0100
message:
  MBug#698132: Fix wrong buffer calculation in send_change_user_packet()
=== modified file 'sql-common/client.c'
--- a/sql-common/client.c	2010-08-06 08:05:44 +0000
+++ b/sql-common/client.c	2011-01-06 14:55:29 +0000
@@ -1978,7 +1978,7 @@ static int send_change_user_packet(MCPVI
   char *buff, *end;
   int res= 1;
 
-  buff= my_alloca(USERNAME_LENGTH + data_len + 1 + NAME_LEN + 2 + NAME_LEN);
+  buff= my_alloca(USERNAME_LENGTH+1 + data_len+1 + NAME_LEN+1 + 2 + NAME_LEN+1);
 
   end= strmake(buff, mysql->user, USERNAME_LENGTH) + 1;
 



More information about the commits mailing list