diff options
Diffstat (limited to 'source/compiler/asloperands.c')
| -rw-r--r-- | source/compiler/asloperands.c | 10 | 
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      { | 
