diff options
author | Ondrej Filip <feela@network.cz> | 2008-08-25 13:57:46 +0200 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2008-08-25 13:57:46 +0200 |
commit | 030e3a79cb9376fa85597fdb8243299cd843ca3a (patch) | |
tree | 3b1acb8b0fa7770ef9de81999b04303bcb23751c /client | |
parent | 057021df0d699f9c21368ab0fa51fe821cc9a544 (diff) | |
download | bird-030e3a79cb9376fa85597fdb8243299cd843ca3a.tar bird-030e3a79cb9376fa85597fdb8243299cd843ca3a.zip |
Buffer overflow fix.
Diffstat (limited to 'client')
-rw-r--r-- | client/client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/client/client.c b/client/client.c index d65ea06..828b9de 100644 --- a/client/client.c +++ b/client/client.c @@ -254,7 +254,7 @@ server_connect(void) die("Cannot create socket: %m"); bzero(&sa, sizeof(sa)); sa.sun_family = AF_UNIX; - strcpy(sa.sun_path, server_path); + strncpy(sa.sun_path, server_path, sizeof(sa.sun_path)); if (connect(server_fd, (struct sockaddr *) &sa, SUN_LEN(&sa)) < 0) die("Unable to connect to server control socket (%s): %m", server_path); if (fcntl(server_fd, F_SETFL, O_NONBLOCK) < 0) |