From: guilhem Date: June 17 2004 1:40pm Subject: bk commit into 3.23 tree (1.1425) List-Archive: http://lists.mysql.com/internals/14726 Message-Id: <20040617134015.AE201B9DAA@gbichot2.local> Below is the list of changes that have just been committed into a local 3.23 repository of guilhem. When guilhem 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://www.mysql.com/doc/I/n/Installing_source_tree.html ChangeSet 1.1425 04/06/17 15:40:13 guilhem@stripped +1 -0 Fix for BUG#4017 "mysql_real_connect buffer overflow" libmysql/libmysql.c 1.80 04/06/17 15:40:12 guilhem@stripped +2 -1 safety fix # 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: guilhem # Host: gbichot2.local # Root: /home/mysql_src/mysql-3.23 --- 1.79/libmysql/libmysql.c 2003-03-10 10:50:46 +01:00 +++ 1.80/libmysql/libmysql.c 2004-06-17 15:40:12 +02:00 @@ -1358,7 +1358,8 @@ my_gethostbyname_r_free(); goto error; } - memcpy(&sock_addr.sin_addr,hp->h_addr, (size_t) hp->h_length); + memcpy(&sock_addr.sin_addr, hp->h_addr, + min(sizeof(sock_addr.sin_addr), (size_t) hp->h_length)); my_gethostbyname_r_free(); } sock_addr.sin_port = (ushort) htons((ushort) port);