Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/sysinst Avoid a buffer overrun with too many interf...
details: https://anonhg.NetBSD.org/src/rev/a1bfcf25632f
branches: trunk
changeset: 462027:a1bfcf25632f
user: martin <martin%NetBSD.org@localhost>
date: Tue Jul 23 12:37:23 2019 +0000
description:
Avoid a buffer overrun with too many interfaces.
diffstat:
usr.sbin/sysinst/net.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (19 lines):
diff -r 19fa86b982bd -r a1bfcf25632f usr.sbin/sysinst/net.c
--- a/usr.sbin/sysinst/net.c Tue Jul 23 12:34:47 2019 +0000
+++ b/usr.sbin/sysinst/net.c Tue Jul 23 12:37:23 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: net.c,v 1.32 2019/07/08 19:46:57 martin Exp $ */
+/* $NetBSD: net.c,v 1.33 2019/07/23 12:37:23 martin Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -260,7 +260,8 @@
strlcpy (devs[i].if_dev, buf, STRSIZE);
i++;
}
- strcpy(devs[i].if_dev, "\0");
+ if (i < MAX_NETS)
+ devs[i].if_dev[0] = 0; /* XXX ? */
free(buf);
free(buf_in);
Home |
Main Index |
Thread Index |
Old Index