summaryrefslogtreecommitdiffstats
path: root/sysdep/unix/io.c
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2008-08-25 13:57:46 +0200
committerOndrej Filip <feela@network.cz>2008-08-25 13:57:46 +0200
commit030e3a79cb9376fa85597fdb8243299cd843ca3a (patch)
tree3b1acb8b0fa7770ef9de81999b04303bcb23751c /sysdep/unix/io.c
parent057021df0d699f9c21368ab0fa51fe821cc9a544 (diff)
downloadbird-030e3a79cb9376fa85597fdb8243299cd843ca3a.tar
bird-030e3a79cb9376fa85597fdb8243299cd843ca3a.zip
Buffer overflow fix.
Diffstat (limited to 'sysdep/unix/io.c')
-rw-r--r--sysdep/unix/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c
index 7dcca21..338edf4 100644
--- a/sysdep/unix/io.c
+++ b/sysdep/unix/io.c
@@ -866,7 +866,7 @@ sk_open_unix(sock *s, char *name)
goto bad;
unlink(name);
sa.sun_family = AF_UNIX;
- strcpy(sa.sun_path, name);
+ strncpy(sa.sun_path, name, sizeof(sa.sun_path));
if (bind(fd, (struct sockaddr *) &sa, SUN_LEN(&sa)) < 0)
ERR("bind");
if (listen(fd, 8))