summaryrefslogtreecommitdiff
path: root/usr.sbin/acpidump
diff options
context:
space:
mode:
authorMike Larkin <mlarkin@cvs.openbsd.org>2009-06-01 18:32:45 +0000
committerMike Larkin <mlarkin@cvs.openbsd.org>2009-06-01 18:32:45 +0000
commit704cf272a862e2b26f02c384137a2de69a837ad5 (patch)
treeec30aae506662b9c256f62087f88f1726e79427a /usr.sbin/acpidump
parent7a0fd66e6d37130f4ff0473a4fcb5d8d117a89f3 (diff)
Fix NULL dereference in aml_name.c (acpidump)
ok jordan@
Diffstat (limited to 'usr.sbin/acpidump')
-rw-r--r--usr.sbin/acpidump/aml/aml_name.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/acpidump/aml/aml_name.c b/usr.sbin/acpidump/aml/aml_name.c
index b41698d7e2c..2d5399db6d9 100644
--- a/usr.sbin/acpidump/aml/aml_name.c
+++ b/usr.sbin/acpidump/aml/aml_name.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aml_name.c,v 1.1 2005/06/02 20:09:39 tholo Exp $ */
+/* $OpenBSD: aml_name.c,v 1.2 2009/06/01 18:32:44 mlarkin Exp $ */
/*-
* Copyright (c) 1999 Takanori Watanabe
* Copyright (c) 1999, 2000 Yasuo Yokoyama
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: aml_name.c,v 1.1 2005/06/02 20:09:39 tholo Exp $
+ * $Id: aml_name.c,v 1.2 2009/06/01 18:32:44 mlarkin Exp $
* $FreeBSD: src/usr.sbin/acpi/amldb/aml/aml_name.c,v 1.3 2000/11/09 06:24:45 iwasaki Exp $
*/
#include <sys/types.h>
@@ -392,6 +392,8 @@ aml_nameman(struct aml_environ *env, u_int8_t *dp, int flag)
} else {
curname = newname;
for (;;) {
+ if (curname == NULL)
+ break;
newname = aml_find_name(curname, dp);
if (newname != NULL)
break;