Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/lib/libc/gen Pull up revision 1.25 (requested by groo):
details: https://anonhg.NetBSD.org/src/rev/712148b476c4
branches: netbsd-1-5
changeset: 493061:712148b476c4
user: he <he%NetBSD.org@localhost>
date: Wed Apr 17 11:34:54 2002 +0000
description:
Pull up revision 1.25 (requested by groo):
Replace an instance of erroneous usage of strncpy() with strlcpy().
diffstat:
lib/libc/gen/getcwd.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r a898ebade65e -r 712148b476c4 lib/libc/gen/getcwd.c
--- a/lib/libc/gen/getcwd.c Wed Apr 17 11:32:47 2002 +0000
+++ b/lib/libc/gen/getcwd.c Wed Apr 17 11:34:54 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getcwd.c,v 1.24 2000/01/22 22:19:10 mycroft Exp $ */
+/* $NetBSD: getcwd.c,v 1.24.4.1 2002/04/17 11:34:54 he Exp $ */
/*
* Copyright (c) 1989, 1991, 1993, 1995
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)getcwd.c 8.5 (Berkeley) 2/7/95";
#else
-__RCSID("$NetBSD: getcwd.c,v 1.24 2000/01/22 22:19:10 mycroft Exp $");
+__RCSID("$NetBSD: getcwd.c,v 1.24.4.1 2002/04/17 11:34:54 he Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -151,7 +151,7 @@
* Save the last component name and get the full pathname of
* the current directory.
*/
- (void)strncpy(wbuf, p, (sizeof(wbuf) - 1));
+ (void)strlcpy(wbuf, p, sizeof(wbuf));
/*
* Call the inernal internal version of getcwd which
Home |
Main Index |
Thread Index |
Old Index