summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorCan Erkin Acar <canacar@cvs.openbsd.org>2006-05-29 21:28:00 +0000
committerCan Erkin Acar <canacar@cvs.openbsd.org>2006-05-29 21:28:00 +0000
commite53d2d6398e110abe1f75efd0d5a786fdedfdd23 (patch)
tree730d48134ace98b9da6ffe655fc41a57f4695f78 /sys/dev
parentc521d6bd3158ca67c1f55cf4594caac9cff0caa0 (diff)
Check for possible NULL dereference in aml_showvalue
tested & ok gwk@ dim@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpi/dsdt.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/acpi/dsdt.c b/sys/dev/acpi/dsdt.c
index 2bf3331c1cc..1d34290beef 100644
--- a/sys/dev/acpi/dsdt.c
+++ b/sys/dev/acpi/dsdt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dsdt.c,v 1.43 2006/05/29 02:39:49 gwk Exp $ */
+/* $OpenBSD: dsdt.c,v 1.44 2006/05/29 21:27:59 canacar Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
*
@@ -678,9 +678,10 @@ aml_showvalue(struct aml_value *value)
value->v_field.bitpos,
value->v_field.bitlen);
- aml_dump(aml_bytelen(value->v_field.bitlen),
- value->v_field.ref1->v_buffer +
- aml_bytepos(value->v_field.bitpos));
+ if (value->v_field.ref1)
+ aml_dump(aml_bytelen(value->v_field.bitlen),
+ value->v_field.ref1->v_buffer +
+ aml_bytepos(value->v_field.bitpos));
aml_showvalue(value->v_field.ref1);
break;