summaryrefslogtreecommitdiff
path: root/bin/csh/dir.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-05-18 20:37:20 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-05-18 20:37:20 +0000
commit81e005b0e7660ee58f28998425a2513ff3234fdc (patch)
tree673523ccc9faf2b5e9b64b4cda17ade292293b7e /bin/csh/dir.c
parent51d4837c780a5f7117a04036d1ee776d578c5550 (diff)
readlink len-1
Diffstat (limited to 'bin/csh/dir.c')
-rw-r--r--bin/csh/dir.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/csh/dir.c b/bin/csh/dir.c
index c53bb55c9ff..6143fbc552f 100644
--- a/bin/csh/dir.c
+++ b/bin/csh/dir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dir.c,v 1.3 1997/07/25 18:58:00 mickey Exp $ */
+/* $OpenBSD: dir.c,v 1.4 1998/05/18 20:37:19 deraadt Exp $ */
/* $NetBSD: dir.c,v 1.9 1995/03/21 09:02:42 cgd Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)dir.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: dir.c,v 1.3 1997/07/25 18:58:00 mickey Exp $";
+static char rcsid[] = "$OpenBSD: dir.c,v 1.4 1998/05/18 20:37:19 deraadt Exp $";
#endif
#endif /* not lint */
@@ -708,7 +708,7 @@ dcanon(cp, p)
*--sp = 0; /* form the pathname for readlink */
if (sp != cp && !adrof(STRignore_symlinks) &&
(cc = readlink(short2str(cp), tlink,
- sizeof tlink)) >= 0) {
+ sizeof tlink-1)) >= 0) {
(void) Strcpy(link, str2short(tlink));
link[cc] = '\0';
@@ -793,7 +793,7 @@ dcanon(cp, p)
if (sp != cp && adrof(STRchase_symlinks) &&
!adrof(STRignore_symlinks) &&
(cc = readlink(short2str(cp), tlink,
- sizeof tlink)) >= 0) {
+ sizeof tlink-1)) >= 0) {
(void) Strcpy(link, str2short(tlink));
link[cc] = '\0';