diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-07-12 00:26:25 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-07-12 00:26:25 +0000 |
commit | 142cea7efbf90f7346eea931c9169fc82d3afa00 (patch) | |
tree | 98526be7cb2652f81eff13482e7ebcbf0156953c /usr.bin/pmdb | |
parent | 0ceb5fe1ba873660807cb0c7fe85b746baff2bc1 (diff) |
malloc/strdup failure not handled; cloder@acm.org
Diffstat (limited to 'usr.bin/pmdb')
-rw-r--r-- | usr.bin/pmdb/break.c | 5 | ||||
-rw-r--r-- | usr.bin/pmdb/clit.c | 4 |
2 files changed, 7 insertions, 2 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."); 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;) { |