Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-3.23

into mysql.com:/home/mysql_src/mysql-3.23
This commit is contained in:
guilhem@mysql.com 2004-06-17 15:41:54 +02:00
commit 5a0a4a134f

View file

@ -1354,7 +1354,8 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
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);