Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/pax PR/53362: Thomas Barabosch: Use strlcpy() to prevent...
details: https://anonhg.NetBSD.org/src/rev/7da14e5d3120
branches: trunk
changeset: 362494:7da14e5d3120
user: christos <christos%NetBSD.org@localhost>
date: Wed Jun 13 15:14:40 2018 +0000
description:
PR/53362: Thomas Barabosch: Use strlcpy() to prevent theoretical buffer
overflow.
diffstat:
bin/pax/pat_rep.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 963c7fbdf7fd -r 7da14e5d3120 bin/pax/pat_rep.c
--- a/bin/pax/pat_rep.c Wed Jun 13 11:17:02 2018 +0000
+++ b/bin/pax/pat_rep.c Wed Jun 13 15:14:40 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pat_rep.c,v 1.29 2009/04/07 19:52:35 perry Exp $ */
+/* $NetBSD: pat_rep.c,v 1.30 2018/06/13 15:14:40 christos Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)pat_rep.c 8.2 (Berkeley) 4/18/94";
#else
-__RCSID("$NetBSD: pat_rep.c,v 1.29 2009/04/07 19:52:35 perry Exp $");
+__RCSID("$NetBSD: pat_rep.c,v 1.30 2018/06/13 15:14:40 christos Exp $");
#endif
#endif /* not lint */
@@ -924,7 +924,7 @@
* (the user already saw that substitution go by)
*/
pt = rephead;
- (void)strcpy(buf1, name);
+ (void)strlcpy(buf1, name, sizeof(buf1));
inpt = buf1;
outpt = nname;
endpt = outpt + PAXPATHLEN;
Home |
Main Index |
Thread Index |
Old Index