Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/bin/csh Pull up revision 1.21 (requested by kleink in t...
details: https://anonhg.NetBSD.org/src/rev/d0074f7e71d6
branches: netbsd-1-6
changeset: 531332:d0074f7e71d6
user: tron <tron%NetBSD.org@localhost>
date: Tue May 11 12:25:26 2004 +0000
description:
Pull up revision 1.21 (requested by kleink in ticket #1688):
use readlink with bufsize - 1; approved thorpej.
diffstat:
bin/csh/dir.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r cac0ffc0ec49 -r d0074f7e71d6 bin/csh/dir.c
--- a/bin/csh/dir.c Tue May 11 12:23:04 2004 +0000
+++ b/bin/csh/dir.c Tue May 11 12:25:26 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.c,v 1.18 2001/11/03 13:35:39 lukem Exp $ */
+/* $NetBSD: dir.c,v 1.18.2.1 2004/05/11 12:25:26 tron Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)dir.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: dir.c,v 1.18 2001/11/03 13:35:39 lukem Exp $");
+__RCSID("$NetBSD: dir.c,v 1.18.2.1 2004/05/11 12:25:26 tron Exp $");
#endif
#endif /* not lint */
@@ -684,7 +684,7 @@
*--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(slink, str2short(tlink));
slink[cc] = '\0';
@@ -767,7 +767,7 @@
if (sp != cp && adrof(STRchase_symlinks) &&
!adrof(STRignore_symlinks) &&
- (cc = readlink(short2str(cp), tlink, sizeof(tlink))) >= 0) {
+ (cc = readlink(short2str(cp), tlink, sizeof(tlink)-1)) >= 0) {
(void)Strcpy(slink, str2short(tlink));
slink[cc] = '\0';
Home |
Main Index |
Thread Index |
Old Index