summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pechkin <mpech@cvs.openbsd.org>2003-07-07 14:39:27 +0000
committerMike Pechkin <mpech@cvs.openbsd.org>2003-07-07 14:39:27 +0000
commitf15496cb530edeae81f5a908341e2b680ef14c2d (patch)
treefdd0cf1af72017c15eab29f4e4d1d99929b5481e
parentf605b77d274d2b1d6fbc3d4d82bc8621d6c86fde (diff)
fix readlink() usage.
millert@ ok
-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 365753cbc36..5ee4666588b 100644
--- a/usr.bin/rdistd/server.c
+++ b/usr.bin/rdistd/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.15 2003/06/03 02:56:15 millert Exp $ */
+/* $OpenBSD: server.c,v 1.16 2003/07/07 14:39:26 mpech Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -36,7 +36,7 @@ static char RCSid[] __attribute__((__unused__)) =
"$From: server.c,v 1.10 1999/08/04 15:57:33 christos Exp $";
#else
static char RCSid[] __attribute__((__unused__)) =
-"$OpenBSD: server.c,v 1.15 2003/06/03 02:56:15 millert Exp $";
+"$OpenBSD: server.c,v 1.16 2003/07/07 14:39:26 mpech Exp $";
#endif
static char sccsid[] __attribute__((__unused__)) =
@@ -1182,7 +1182,7 @@ recvlink(char *new, opt_t opts, int mode, off_t size)
}
uptodate = 0;
- if ((i = readlink(target, tbuf, sizeof(tbuf))) != -1) {
+ if ((i = readlink(target, tbuf, sizeof(tbuf)-1)) != -1) {
tbuf[i] = '\0';
if (i == size && strncmp(buf, tbuf, (int) size) == 0)
uptodate = 1;