summaryrefslogtreecommitdiff
path: root/usr.bin/pmdb
diff options
context:
space:
mode:
authorPeter Valchev <pvalchev@cvs.openbsd.org>2003-04-25 20:07:10 +0000
committerPeter Valchev <pvalchev@cvs.openbsd.org>2003-04-25 20:07:10 +0000
commite294f1e17d0e66df5e6f777424a6fa89f3dd1a63 (patch)
tree1ee310fde6f677d6f3151193815430dba5ad415a /usr.bin/pmdb
parent14f6abdffc727eeddbcea128909598e7ffd9dfaa (diff)
check asprintf return value for error, as the pointer is not guaranteed
to be NULL in such case; ok millert
Diffstat (limited to 'usr.bin/pmdb')
-rw-r--r--usr.bin/pmdb/aout_syms.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/pmdb/aout_syms.c b/usr.bin/pmdb/aout_syms.c
index d3b2147b139..aff29d1eec8 100644
--- a/usr.bin/pmdb/aout_syms.c
+++ b/usr.bin/pmdb/aout_syms.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aout_syms.c,v 1.9 2002/07/22 01:20:50 art Exp $ */
+/* $OpenBSD: aout_syms.c,v 1.10 2003/04/25 20:07:09 pvalchev Exp $ */
/*
* Copyright (c) 2002 Federico Schwindt <fgsch@openbsd.org>
* All rights reserved.
@@ -253,8 +253,7 @@ restart:
if (s == NULL) {
if (first) {
- asprintf(&sname, "_%s", sname);
- if (sname != NULL) {
+ if (asprintf(&sname, "_%s", sname) != -1) {
first = 0;
goto restart;
}