Blame SOURCES/DSDT-too-long.patch
|
|
517133 |
ASL Test Suite encounters the following type of error...
|
|
|
517133 |
|
|
|
517133 |
Table [DSDT] is too long for file - needs: 0xCE4C0000, remaining in file: 0x4CCE
|
|
|
517133 |
|
|
|
517133 |
when tests/aslts.sh was run on a big-endian system.
|
|
|
517133 |
|
|
|
517133 |
diff --git a/source/common/acfileio.c b/source/common/acfileio.c
|
|
|
517133 |
index 589eaea..83e59e2 100644
|
|
|
517133 |
--- a/source/common/acfileio.c
|
|
|
517133 |
+++ b/source/common/acfileio.c
|
|
|
517133 |
@@ -391,6 +391,7 @@ AcValidateTableHeader (
|
|
|
517133 |
size_t Actual;
|
|
|
517133 |
long OriginalOffset;
|
|
|
517133 |
UINT32 FileSize;
|
|
|
517133 |
+ UINT32 Length;
|
|
|
517133 |
UINT32 i;
|
|
|
517133 |
|
|
|
517133 |
|
|
|
517133 |
@@ -422,11 +423,12 @@ AcValidateTableHeader (
|
|
|
517133 |
/* Validate table length against bytes remaining in the file */
|
|
|
517133 |
|
|
|
517133 |
FileSize = CmGetFileSize (File);
|
|
|
517133 |
- if (TableHeader.Length > (UINT32) (FileSize - TableOffset))
|
|
|
517133 |
+ ACPI_MOVE_32_TO_32(&Length, &TableHeader.Length);
|
|
|
517133 |
+ if (Length > (UINT32) (FileSize - TableOffset))
|
|
|
517133 |
{
|
|
|
517133 |
fprintf (stderr, "Table [%4.4s] is too long for file - "
|
|
|
517133 |
"needs: 0x%.2X, remaining in file: 0x%.2X\n",
|
|
|
517133 |
- TableHeader.Signature, TableHeader.Length,
|
|
|
517133 |
+ TableHeader.Signature, Length,
|
|
|
517133 |
(UINT32) (FileSize - TableOffset));
|
|
|
517133 |
return (AE_BAD_HEADER);
|
|
|
517133 |
}
|