summaryrefslogtreecommitdiff
path: root/usr.bin/pmdb/clit.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-07-12 00:26:25 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-07-12 00:26:25 +0000
commit142cea7efbf90f7346eea931c9169fc82d3afa00 (patch)
tree98526be7cb2652f81eff13482e7ebcbf0156953c /usr.bin/pmdb/clit.c
parent0ceb5fe1ba873660807cb0c7fe85b746baff2bc1 (diff)
malloc/strdup failure not handled; cloder@acm.org
Diffstat (limited to 'usr.bin/pmdb/clit.c')
-rw-r--r--usr.bin/pmdb/clit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/pmdb/clit.c b/usr.bin/pmdb/clit.c
index bb05e321306..d73e571cea6 100644
--- a/usr.bin/pmdb/clit.c
+++ b/usr.bin/pmdb/clit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clit.c,v 1.2 2002/03/15 16:41:06 jason Exp $ */
+/* $OpenBSD: clit.c,v 1.3 2002/07/12 00:24:53 deraadt Exp $ */
/*
* Copyright (c) 2002 Artur Grabowski <art@openbsd.org>
* All rights reserved.
@@ -216,6 +216,8 @@ cmdloop(void *arg)
#endif
orgline = line = strdup(elline);
+ if (line == NULL)
+ err(1, "strdup");
argc = 0;
for (ap = argv; (*ap = strsep(&line, " \t\n")) != NULL;) {