diff options
Diffstat (limited to 'source/components/disassembler/dmresrc.c')
-rw-r--r-- | source/components/disassembler/dmresrc.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/components/disassembler/dmresrc.c b/source/components/disassembler/dmresrc.c index 3c24855f9771..c50c1c42d83c 100644 --- a/source/components/disassembler/dmresrc.c +++ b/source/components/disassembler/dmresrc.c @@ -540,6 +540,20 @@ AcpiDmIsResourceTemplate ( BufferLength = NextOp->Common.Value.Size; /* + * Any buffer smaller than one byte cannot possibly be a resource + * template. Two bytes could possibly be a "NULL" resource template + * with a lone end tag descriptor (as generated via + * "ResourceTemplate(){}"), but this would be an extremely unusual + * case, as the template would be essentially useless. The disassembler + * therefore does not recognize any two-byte buffer as a resource + * template. + */ + if (BufferLength <= 2) + { + return (AE_TYPE); + } + + /* * Not a template if declared buffer length != actual length of the * intialization byte list. Because the resource macros will create * a buffer of the exact required length (buffer length will be equal |