diff options
author | unknown <guilhem@mysql.com> | 2004-06-17 15:41:54 +0200 |
---|---|---|
committer | unknown <guilhem@mysql.com> | 2004-06-17 15:41:54 +0200 |
commit | b57fe1e26ae91b660c0d8665bb6e9e3f9e154076 (patch) | |
tree | 7d67d3ba175857a4f3c626adb2b6e80c6aad317a | |
parent | 3665b3be90c2821dc95903cdf39df7a54e3c91a1 (diff) | |
parent | 414250c4f296529a3d20ac4c3cc5474fccaad47f (diff) | |
download | mariadb-git-b57fe1e26ae91b660c0d8665bb6e9e3f9e154076.tar.gz |
Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-3.23
into mysql.com:/home/mysql_src/mysql-3.23
libmysql/libmysql.c:
Auto merged
-rw-r--r-- | libmysql/libmysql.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index eff8c87ee3f..62ad8f398e9 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -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); |