aboutsummaryrefslogtreecommitdiff
path: root/source/components/executer/exoparg2.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2013-04-04 21:18:57 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2013-04-04 21:18:57 +0000
commit0ff2ef6cfe11e98b10c26dc8f1c359e6502538c8 (patch)
tree2d060ed4fedfc9aace2e673176570faa8ae1d376 /source/components/executer/exoparg2.c
parent6bb10c5e2fa82c104e57c7468335930ba9e47d4f (diff)
downloadsrc-0ff2ef6cfe11e98b10c26dc8f1c359e6502538c8.tar.gz
src-0ff2ef6cfe11e98b10c26dc8f1c359e6502538c8.zip
Import ACPICA 20130328.vendor/acpica/20130328
Notes
Notes: svn path=/vendor-sys/acpica/dist/; revision=249109 svn path=/vendor-sys/acpica/20130328/; revision=249110; tag=vendor/acpica/20130328
Diffstat (limited to 'source/components/executer/exoparg2.c')
-rw-r--r--source/components/executer/exoparg2.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/components/executer/exoparg2.c b/source/components/executer/exoparg2.c
index ada92663327b..6151fa8ddf8f 100644
--- a/source/components/executer/exoparg2.c
+++ b/source/components/executer/exoparg2.c
@@ -286,7 +286,7 @@ AcpiExOpcode_2A_1T_1R (
ACPI_OPERAND_OBJECT *ReturnDesc = NULL;
UINT64 Index;
ACPI_STATUS Status = AE_OK;
- ACPI_SIZE Length;
+ ACPI_SIZE Length = 0;
ACPI_FUNCTION_TRACE_STR (ExOpcode_2A_1T_1R,
@@ -356,7 +356,6 @@ AcpiExOpcode_2A_1T_1R (
* NOTE: A length of zero is ok, and will create a zero-length, null
* terminated string.
*/
- Length = 0;
while ((Length < Operand[0]->Buffer.Length) &&
(Length < Operand[1]->Integer.Value) &&
(Operand[0]->Buffer.Pointer[Length]))
@@ -418,6 +417,7 @@ AcpiExOpcode_2A_1T_1R (
if (Index >= Operand[0]->String.Length)
{
+ Length = Operand[0]->String.Length;
Status = AE_AML_STRING_LIMIT;
}
@@ -428,6 +428,7 @@ AcpiExOpcode_2A_1T_1R (
if (Index >= Operand[0]->Buffer.Length)
{
+ Length = Operand[0]->Buffer.Length;
Status = AE_AML_BUFFER_LIMIT;
}
@@ -438,6 +439,7 @@ AcpiExOpcode_2A_1T_1R (
if (Index >= Operand[0]->Package.Count)
{
+ Length = Operand[0]->Package.Count;
Status = AE_AML_PACKAGE_LIMIT;
}
@@ -456,8 +458,8 @@ AcpiExOpcode_2A_1T_1R (
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status,
- "Index (0x%8.8X%8.8X) is beyond end of object",
- ACPI_FORMAT_UINT64 (Index)));
+ "Index (0x%X%8.8X) is beyond end of object (length 0x%X)",
+ ACPI_FORMAT_UINT64 (Index), (UINT32) Length));
goto Cleanup;
}