Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/usr.sbin/traceroute Pull up revision 1.40 (requested by...
details: https://anonhg.NetBSD.org/src/rev/9aab774bfeef
branches: netbsd-1-4
changeset: 471045:9aab774bfeef
user: he <he%NetBSD.org@localhost>
date: Thu Oct 19 15:34:08 2000 +0000
description:
Pull up revision 1.40 (requested by sommerfeld):
Avoid using savestr() on something which will later be passed to
free(). Raised as a potential security issue on bugtraq. No
actual exploits known.
diffstat:
usr.sbin/traceroute/traceroute.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 594ba38bdf89 -r 9aab774bfeef usr.sbin/traceroute/traceroute.c
--- a/usr.sbin/traceroute/traceroute.c Thu Oct 19 15:32:11 2000 +0000
+++ b/usr.sbin/traceroute/traceroute.c Thu Oct 19 15:34:08 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: traceroute.c,v 1.30.2.2 1999/06/28 23:52:58 perry Exp $ */
+/* $NetBSD: traceroute.c,v 1.30.2.3 2000/10/19 15:34:08 he Exp $ */
/*
* Copyright (c) 1988, 1989, 1991, 1994, 1995, 1996, 1997
@@ -29,7 +29,7 @@
#else
__COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1991, 1994, 1995, 1996, 1997\n\
The Regents of the University of California. All rights reserved.\n");
-__RCSID("$NetBSD: traceroute.c,v 1.30.2.2 1999/06/28 23:52:58 perry Exp $");
+__RCSID("$NetBSD: traceroute.c,v 1.30.2.3 2000/10/19 15:34:08 he Exp $");
#endif
#endif
@@ -1349,7 +1349,7 @@
exit(1);
}
if (inet_aton(hostname, &addr) != 0) {
- hi->name = savestr(hostname);
+ hi->name = strdup(hostname);
hi->n = 1;
hi->addrs = calloc(1, sizeof(hi->addrs[0]));
if (hi->addrs == NULL) {
@@ -1370,7 +1370,7 @@
Fprintf(stderr, "%s: bad host %s\n", prog, hostname);
exit(1);
}
- hi->name = savestr(hp->h_name);
+ hi->name = strdup(hp->h_name);
for (n = 0, p = hp->h_addr_list; *p != NULL; ++n, ++p)
continue;
hi->n = n;
Home |
Main Index |
Thread Index |
Old Index