Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/libexec/telnetd Pull up revision 1.18 (requested by ito...
details: https://anonhg.NetBSD.org/src/rev/978630b1a708
branches: netbsd-1-4
changeset: 469987:978630b1a708
user: he <he%NetBSD.org@localhost>
date: Sat Jan 08 18:10:46 2000 +0000
description:
Pull up revision 1.18 (requested by itojun):
Abort if memory for execv(2) argument array cannot be allocated
instead of passing an array with incomplete contents to login(1).
Fixes PR#9082.
diffstat:
libexec/telnetd/sys_term.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r 0a4bebc2ef5f -r 978630b1a708 libexec/telnetd/sys_term.c
--- a/libexec/telnetd/sys_term.c Sat Jan 08 18:09:59 2000 +0000
+++ b/libexec/telnetd/sys_term.c Sat Jan 08 18:10:46 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_term.c,v 1.15 1999/02/12 05:30:12 dean Exp $ */
+/* $NetBSD: sys_term.c,v 1.15.2.1 2000/01/08 18:10:46 he Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)sys_term.c 8.4+1 (Berkeley) 5/30/95";
#else
-__RCSID("$NetBSD: sys_term.c,v 1.15 1999/02/12 05:30:12 dean Exp $");
+__RCSID("$NetBSD: sys_term.c,v 1.15.2.1 2000/01/08 18:10:46 he Exp $");
#endif
#endif /* not lint */
@@ -1857,8 +1857,10 @@
--argv;
*argv = (char *)((long)(*argv) + 10);
argv = (char **)realloc(argv, sizeof(*argv)*((long)(*argv) + 2));
- if (argv == NULL)
- return(NULL);
+ if (argv == NULL) {
+ fatal(net, "not enough memory");
+ /*NOTREACHED*/
+ }
argv++;
cpp = &argv[(long)argv[-1] - 10];
}
Home |
Main Index |
Thread Index |
Old Index