summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-06-21 10:21:20 +0300
committermonty@mysql.com <>2004-06-21 10:21:20 +0300
commit1388c164bcd235c9612961bc902cd9e77b079a89 (patch)
treea55d40c04126c696aec19a9bdd340a11258e07e6 /sql-common
parentb11d25883554a7e3da972cc593a9d2a0c6094096 (diff)
downloadmariadb-git-1388c164bcd235c9612961bc902cd9e77b079a89.tar.gz
After merge fixes
Return NULL if a time argument is given to date_add(). (Warning will be shown after Dimitri's timezone patch is pushed)
Diffstat (limited to 'sql-common')
-rw-r--r--sql-common/client.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index 61ffd2b52e6..5c1a718c5bb 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -1732,7 +1732,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
sprintf(net->last_error, ER(CR_UNKNOWN_HOST), host, tmp_errno);
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);