Commit 6e820c80 authored by monty@mysql.com's avatar monty@mysql.com

Merge mysql.com:/home/my/mysql-3.23 into mysql.com:/home/my/mysql-4.0

parents 7a046496 5a0a4a13
...@@ -1863,7 +1863,8 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, ...@@ -1863,7 +1863,8 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
sprintf(net->last_error, ER(CR_UNKNOWN_HOST), host, tmp_errno); sprintf(net->last_error, ER(CR_UNKNOWN_HOST), host, tmp_errno);
goto error; 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(); my_gethostbyname_r_free();
} }
sock_addr.sin_port = (ushort) htons((ushort) port); sock_addr.sin_port = (ushort) htons((ushort) port);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment