From f15496cb530edeae81f5a908341e2b680ef14c2d Mon Sep 17 00:00:00 2001 From: Mike Pechkin Date: Mon, 7 Jul 2003 14:39:27 +0000 Subject: fix readlink() usage. millert@ ok --- usr.bin/rdistd/server.c | 6 +++--- 1 file 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; -- cgit v1.2.3