summaryrefslogtreecommitdiff
path: root/usr.bin/pmdb/break.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/break.c
parent0ceb5fe1ba873660807cb0c7fe85b746baff2bc1 (diff)
malloc/strdup failure not handled; cloder@acm.org
Diffstat (limited to 'usr.bin/pmdb/break.c')
-rw-r--r--usr.bin/pmdb/break.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/pmdb/break.c b/usr.bin/pmdb/break.c
index 3cd4ae5e8c4..1e2455297ca 100644
--- a/usr.bin/pmdb/break.c
+++ b/usr.bin/pmdb/break.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: break.c,v 1.2 2002/03/15 16:41:06 jason Exp $ */
+/* $OpenBSD: break.c,v 1.3 2002/07/12 00:24:53 deraadt Exp $ */
/*
* Copyright (c) 2002 Artur Grabowski <art@openbsd.org>
* All rights reserved.
@@ -187,6 +187,9 @@ bkpt_check(struct pstate *ps)
* of the callbacks require a stop.
*/
rg = alloca(sizeof(*rg) * md_def.nregs);
+ if (rg == NULL)
+ err(1, "bkpt_check: Can't allocate stack space.");
+
if (md_getregs(ps, rg))
err(1, "bkpt_check: Can't get registers.");