diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2015-04-09 23:08:47 +0000 |
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2015-04-09 23:08:47 +0000 |
| commit | d29c30140bd8ea81e0530ad3975c977891ab9275 (patch) | |
| tree | 7a91c0da98a89b4b10beda84d027d2c779673064 /source/components/disassembler | |
| parent | 2872953d4a9c9c4e0fc0b9ab37d0e962909625a0 (diff) | |
Notes
Diffstat (limited to 'source/components/disassembler')
| -rw-r--r-- | source/components/disassembler/dmcstyle.c | 30 | ||||
| -rw-r--r-- | source/components/disassembler/dmopcode.c | 12 | ||||
| -rw-r--r-- | source/components/disassembler/dmwalk.c | 2 |
3 files changed, 31 insertions, 13 deletions
diff --git a/source/components/disassembler/dmcstyle.c b/source/components/disassembler/dmcstyle.c index 1f1381969f57..71aef9b0e9fb 100644 --- a/source/components/disassembler/dmcstyle.c +++ b/source/components/disassembler/dmcstyle.c @@ -114,12 +114,20 @@ AcpiDmCheckForSymbolicOpcode ( Child1 = AcpiPsGetArg (Op, 0); if (!Child1) { + /* Parse tree may be confused or corrupted */ + return (FALSE); } /* Get the second operand */ Child2 = Child1->Common.Next; + if (!Child2) + { + /* Parse tree may be confused or corrupted */ + + return (FALSE); + } /* Setup the operator string for this opcode */ @@ -299,8 +307,16 @@ AcpiDmCheckForSymbolicOpcode ( /* Target is 3rd operand */ Target = Child2->Common.Next; + if (Op->Common.AmlOpcode == AML_DIVIDE_OP) { + if (!Target) + { + /* Parse tree may be confused or corrupted */ + + return (FALSE); + } + /* * Divide has an extra target operand (Remainder). * If this extra target is specified, it cannot be converted @@ -403,6 +419,13 @@ AcpiDmCheckForSymbolicOpcode ( /* Target is optional, 3rd operand */ Target = Child2->Common.Next; + if (!Target) + { + /* Parse tree may be confused or corrupted */ + + return (FALSE); + } + if (AcpiDmIsValidTarget (Target)) { AcpiDmPromoteTarget (Op, Target); @@ -423,6 +446,13 @@ AcpiDmCheckForSymbolicOpcode ( * source so that the target is processed first. */ Target = Child1->Common.Next; + if (!Target) + { + /* Parse tree may be confused or corrupted */ + + return (FALSE); + } + AcpiDmPromoteTarget (Op, Target); if (!Target->Common.OperatorSymbol) diff --git a/source/components/disassembler/dmopcode.c b/source/components/disassembler/dmopcode.c index bcd68dc4626c..d8ab1d51c758 100644 --- a/source/components/disassembler/dmopcode.c +++ b/source/components/disassembler/dmopcode.c @@ -852,18 +852,6 @@ AcpiDmDisassembleOneOp ( } break; - case AML_INT_STATICSTRING_OP: - - if (Op->Common.Value.String) - { - AcpiOsPrintf ("%s", Op->Common.Value.String); - } - else - { - AcpiOsPrintf ("\"<NULL STATIC STRING PTR>\""); - } - break; - case AML_INT_NAMEPATH_OP: AcpiDmNamestring (Op->Common.Value.Name); diff --git a/source/components/disassembler/dmwalk.c b/source/components/disassembler/dmwalk.c index 200da829fc10..6a8c505439f4 100644 --- a/source/components/disassembler/dmwalk.c +++ b/source/components/disassembler/dmwalk.c @@ -562,7 +562,7 @@ AcpiDmDescendingOp ( if (Op->Common.AmlOpcode != AML_INT_NAMEDFIELD_OP) { - if (AcpiGbl_DbOpt_verbose) + if (AcpiGbl_DbOpt_Verbose) { (void) AcpiPsDisplayObjectPathname (NULL, Op); } |
