summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2014-12-03 17:00:16 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2014-12-03 17:00:16 +0000
commit8fc9bdaa340b2e20b94ccef5d5fd47bae87bd4bd (patch)
tree837875c8be3b9e5439fc0bfa36d237d41b92a71c /usr.sbin
parentb51ad7038e26e1f359b27838145bbfa52d2ed560 (diff)
Fix off by one in check for socket path too long. From Nicolas Bedos.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/syslogd/syslogd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index 9548afe08db..1b739ae3eb5 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: syslogd.c,v 1.131 2014/11/26 18:34:52 millert Exp $ */
+/* $OpenBSD: syslogd.c,v 1.132 2014/12/03 17:00:15 millert Exp $ */
/*
* Copyright (c) 1983, 1988, 1993, 1994
@@ -1815,7 +1815,7 @@ unix_socket(char *path, int type, mode_t mode)
memset(&s_un, 0, sizeof(s_un));
s_un.sun_family = AF_UNIX;
- if (strlcpy(s_un.sun_path, path, sizeof(s_un.sun_path)) >
+ if (strlcpy(s_un.sun_path, path, sizeof(s_un.sun_path)) >=
sizeof(s_un.sun_path)) {
snprintf(errbuf, sizeof(errbuf), "socket path too long: %s",
path);