diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2012-11-14 22:20:16 +0000 | 
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2012-11-14 22:20:16 +0000 | 
| commit | c2463a8709e5b3a5ce54c09d35b4820a756b0fc5 (patch) | |
| tree | 2ffc551e57f0545a17c165d729c1438a26236f60 /source/components/disassembler/dmresrc.c | |
| parent | 31aa864e8c068201d58aad3a8f82ddb51df11015 (diff) | |
Notes
Diffstat (limited to 'source/components/disassembler/dmresrc.c')
| -rw-r--r-- | source/components/disassembler/dmresrc.c | 14 | 
1 files changed, 11 insertions, 3 deletions
diff --git a/source/components/disassembler/dmresrc.c b/source/components/disassembler/dmresrc.c index 470be9505090d..bf2a4d4da496e 100644 --- a/source/components/disassembler/dmresrc.c +++ b/source/components/disassembler/dmresrc.c @@ -279,7 +279,7 @@ AcpiDmResourceTemplate (          /* Validate the Resource Type and Resource Length */ -        Status = AcpiUtValidateResource (Aml, &ResourceIndex); +        Status = AcpiUtValidateResource (NULL, Aml, &ResourceIndex);          if (ACPI_FAILURE (Status))          {              AcpiOsPrintf ("/*** Could not validate Resource, type (%X) %s***/\n", @@ -366,7 +366,8 @@ AcpiDmResourceTemplate (   *   * FUNCTION:    AcpiDmIsResourceTemplate   * - * PARAMETERS:  Op          - Buffer Op to be examined + * PARAMETERS:  WalkState           - Current walk info + *              Op                  - Buffer Op to be examined   *   * RETURN:      Status. AE_OK if valid template   * @@ -377,6 +378,7 @@ AcpiDmResourceTemplate (  ACPI_STATUS  AcpiDmIsResourceTemplate ( +    ACPI_WALK_STATE         *WalkState,      ACPI_PARSE_OBJECT       *Op)  {      ACPI_STATUS             Status; @@ -396,6 +398,12 @@ AcpiDmIsResourceTemplate (      /* Get the ByteData list and length */      NextOp = Op->Common.Value.Arg; +    if (!NextOp) +    { +        AcpiOsPrintf ("NULL byte list in buffer\n"); +        return (AE_TYPE); +    } +      NextOp = NextOp->Common.Next;      if (!NextOp)      { @@ -407,7 +415,7 @@ AcpiDmIsResourceTemplate (      /* Walk the byte list, abort on any invalid descriptor type or length */ -    Status = AcpiUtWalkAmlResources (Aml, Length, NULL, &EndAml); +    Status = AcpiUtWalkAmlResources (WalkState, Aml, Length, NULL, &EndAml);      if (ACPI_FAILURE (Status))      {          return (AE_TYPE);  | 
