summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authormonty@narttu.mysql.fi <>2003-06-04 18:22:48 +0300
committermonty@narttu.mysql.fi <>2003-06-04 18:22:48 +0300
commit6217b578b9b9a6f65b6891b888be357d3148f4d0 (patch)
treecb6b4500f1210e791d5f323dc5c3492c11ba8a12 /libmysql
parent100a66e6cbb6598039fdd0c0b5e9f8ed6e1d025d (diff)
downloadmariadb-git-6217b578b9b9a6f65b6891b888be357d3148f4d0.tar.gz
Fixed (not fatal) buffer overflow
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index af74182eb22..c008d625900 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -1646,7 +1646,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
net->vio = vio_new(sock, VIO_TYPE_SOCKET, TRUE);
bzero((char*) &UNIXaddr,sizeof(UNIXaddr));
UNIXaddr.sun_family = AF_UNIX;
- strmov(UNIXaddr.sun_path, unix_socket);
+ strmake(UNIXaddr.sun_path, unix_socket, sizeof(UNIXaddr.sun_path)-1);
if (my_connect(sock,(struct sockaddr *) &UNIXaddr, sizeof(UNIXaddr),
mysql->options.connect_timeout) <0)
{