diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/talk/get_names.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/talk/get_names.c b/usr.bin/talk/get_names.c index 56be44c5c6f..944a7f606c7 100644 --- a/usr.bin/talk/get_names.c +++ b/usr.bin/talk/get_names.c @@ -1,4 +1,4 @@ -/* $OpenBSD: get_names.c,v 1.13 2003/07/10 00:06:51 david Exp $ */ +/* $OpenBSD: get_names.c,v 1.14 2003/10/01 06:32:44 deraadt Exp $ */ /* $NetBSD: get_names.c,v 1.4 1994/12/09 02:14:16 jtc Exp $ */ /* @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)get_names.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: get_names.c,v 1.13 2003/07/10 00:06:51 david Exp $"; +static char rcsid[] = "$OpenBSD: get_names.c,v 1.14 2003/10/01 06:32:44 deraadt Exp $"; #endif /* not lint */ #include "talk.h" @@ -93,6 +93,8 @@ get_names(argc, argv) my_machine_name = hostname; /* check for, and strip out, the machine name of the target */ names = strdup(argv[1]); + if (names == NULL) + errx(1, "out of memory"); for (cp = names; *cp && !strchr("@:!.", *cp); cp++) ; if (*cp == '\0') { |