summaryrefslogtreecommitdiff
path: root/usr.bin/rdistd
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-05-18 19:13:40 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-05-18 19:13:40 +0000
commitd51d6214fa2abd8ab575dfad3ef0690ab2a096d6 (patch)
treed11a883bf092b8f77001a674d42769deeb1a3367 /usr.bin/rdistd
parentef77d4ef152a7f3529fa71b2c2eaedb17241d696 (diff)
readlink len-1
Diffstat (limited to 'usr.bin/rdistd')
-rw-r--r--usr.bin/rdistd/server.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/rdistd/server.c b/usr.bin/rdistd/server.c
index f49fc842651..1fd3152adf1 100644
--- a/usr.bin/rdistd/server.c
+++ b/usr.bin/rdistd/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.5 1996/07/25 05:31:03 millert Exp $ */
+/* $OpenBSD: server.c,v 1.6 1998/05/18 19:12:53 deraadt Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -34,7 +34,7 @@
*/
#ifndef lint
static char RCSid[] =
-"$OpenBSD: server.c,v 1.5 1996/07/25 05:31:03 millert Exp $";
+"$OpenBSD: server.c,v 1.6 1998/05/18 19:12:53 deraadt Exp $";
static char sccsid[] = "@(#)server.c 5.3 (Berkeley) 6/7/86";
@@ -1162,7 +1162,7 @@ static void recvlink(new, opts, mode, size)
if (IS_ON(opts, DO_COMPARE)) {
char tbuf[MAXPATHLEN];
- if ((i = readlink(target, tbuf, sizeof(tbuf))) >= 0 &&
+ if ((i = readlink(target, tbuf, sizeof(tbuf)-1)) >= 0 &&
i == size && strncmp(buf, tbuf, (int) size) == 0) {
(void) unlink(new);
ack();