diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-05-18 19:10:07 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-05-18 19:10:07 +0000 |
commit | 8cea54ee8e96b90f9ba4c849b21303c6a7dcc74e (patch) | |
tree | bd353ed9d8947eeac9ad2e584add4e921b9f6b33 /usr.sbin/mtree | |
parent | 4b59cedb488f111bb9dc8707c56308072979ca2f (diff) |
readlink len-1
Diffstat (limited to 'usr.sbin/mtree')
-rw-r--r-- | usr.sbin/mtree/compare.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/mtree/compare.c b/usr.sbin/mtree/compare.c index f353d5f04ff..dcca39f9e9a 100644 --- a/usr.sbin/mtree/compare.c +++ b/usr.sbin/mtree/compare.c @@ -1,5 +1,5 @@ /* $NetBSD: compare.c,v 1.11 1996/09/05 09:56:48 mycroft Exp $ */ -/* $OpenBSD: compare.c,v 1.9 1997/07/18 05:49:02 millert Exp $ */ +/* $OpenBSD: compare.c,v 1.10 1998/05/18 19:10:06 deraadt Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)compare.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: compare.c,v 1.9 1997/07/18 05:49:02 millert Exp $"; +static char rcsid[] = "$OpenBSD: compare.c,v 1.10 1998/05/18 19:10:06 deraadt Exp $"; #endif #endif /* not lint */ @@ -339,7 +339,7 @@ rlink(name) static char lbuf[MAXPATHLEN]; register int len; - if ((len = readlink(name, lbuf, sizeof(lbuf))) == -1) + if ((len = readlink(name, lbuf, sizeof(lbuf)-1)) == -1) error("%s: %s", name, strerror(errno)); lbuf[len] = '\0'; return (lbuf); |