summaryrefslogtreecommitdiff
path: root/source/compiler/asloperands.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2019-02-20 23:04:28 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2019-02-20 23:04:28 +0000
commit933b0124ad04366156cb4793d2530ad791d88ead (patch)
tree6d20df0ad987596d76c7b0f8e58ef8e8e25b4b69 /source/compiler/asloperands.c
parentca9862327327526f102b9370cc74b2a9e4641b0d (diff)
Notes
Diffstat (limited to 'source/compiler/asloperands.c')
-rw-r--r--source/compiler/asloperands.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/compiler/asloperands.c b/source/compiler/asloperands.c
index a4781ed4335d..172f347063bc 100644
--- a/source/compiler/asloperands.c
+++ b/source/compiler/asloperands.c
@@ -657,6 +657,7 @@ OpnDoRegion (
ACPI_PARSE_OBJECT *Op)
{
ACPI_PARSE_OBJECT *Next;
+ ACPI_ADR_SPACE_TYPE SpaceId;
/* Opcode is parent node */
@@ -664,9 +665,10 @@ OpnDoRegion (
Next = Op->Asl.Child;
- /* Second child is the space ID*/
+ /* Second child is the space ID */
Next = Next->Asl.Next;
+ SpaceId = (ACPI_ADR_SPACE_TYPE) Next->Common.Value.Integer;
/* Third child is the region offset */
@@ -677,7 +679,13 @@ OpnDoRegion (
Next = Next->Asl.Next;
if (Next->Asl.ParseOpcode == PARSEOP_INTEGER)
{
+ /* Check for zero length */
+
Op->Asl.Value.Integer = Next->Asl.Value.Integer;
+ if (!Op->Asl.Value.Integer && (SpaceId < ACPI_NUM_PREDEFINED_REGIONS))
+ {
+ AslError (ASL_ERROR, ASL_MSG_REGION_LENGTH, Op, NULL);
+ }
}
else
{