From: Ondrej Filip Date: Mon, 25 Aug 2008 12:06:20 +0000 (+0000) Subject: Previous patch reverted. :-( X-Git-Tag: v1.2.0~199 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97c6fa02e089e3fb057185fe5937297afc5a11ec;p=thirdparty%2Fbird.git Previous patch reverted. :-( --- diff --git a/client/client.c b/client/client.c index 828b9dee9..d65ea066b 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; - strncpy(sa.sun_path, server_path, sizeof(sa.sun_path)); + strcpy(sa.sun_path, server_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) diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index 338edf433..7dcca21ab 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; - strncpy(sa.sun_path, name, sizeof(sa.sun_path)); + strcpy(sa.sun_path, name); if (bind(fd, (struct sockaddr *) &sa, SUN_LEN(&sa)) < 0) ERR("bind"); if (listen(fd, 8))