diff options
author | Can Erkin Acar <canacar@cvs.openbsd.org> | 2006-05-29 00:43:57 +0000 |
---|---|---|
committer | Can Erkin Acar <canacar@cvs.openbsd.org> | 2006-05-29 00:43:57 +0000 |
commit | d8063b913ee68b6fb20f43ce611c18a0d9dd50b6 (patch) | |
tree | 901d262c2fedaf76c7c9099d04a51f27b56e688d /sys/dev/acpi/dsdt.c | |
parent | 25ef9bd51c9ea5756728a1c509ab0702f161636d (diff) |
Fix a memory overrun in the aml parser code.
ok deraadt@, gwk@
Diffstat (limited to 'sys/dev/acpi/dsdt.c')
-rw-r--r-- | sys/dev/acpi/dsdt.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/acpi/dsdt.c b/sys/dev/acpi/dsdt.c index b24c9acb72b..36996877c21 100644 --- a/sys/dev/acpi/dsdt.c +++ b/sys/dev/acpi/dsdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsdt.c,v 1.41 2006/04/21 23:03:04 joris Exp $ */ +/* $OpenBSD: dsdt.c,v 1.42 2006/05/29 00:43:56 canacar Exp $ */ /* * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> * @@ -1549,8 +1549,9 @@ aml_efield(struct acpi_context *ctx, struct aml_value *e_fld, } rv = aml_val2buf(ctx, rhs, blen); - aml_bufcpy(pb, e_fld->v_field.bitpos, rv->v_buffer, 0, - e_fld->v_field.bitlen); + + aml_bufcpy(pb, aml_bitpos(e_fld->v_field.bitpos), + rv->v_buffer, 0, e_fld->v_field.bitlen); if (rv != rhs) aml_freevalue(&rv); |