]> git.pld-linux.org Git - packages/acpica.git/blob - 0005-Correct-an-endian-ness-problem-when-converting-ASL-t.patch
- updated tests
[packages/acpica.git] / 0005-Correct-an-endian-ness-problem-when-converting-ASL-t.patch
1 From 055fee09d8f9244b6c437ad18b98edb81a87e8bc Mon Sep 17 00:00:00 2001
2 From: Al Stone <ahs3@redhat.com>
3 Date: Tue, 27 Oct 2020 17:50:52 -0600
4 Subject: [PATCH 05/45] Correct an endian-ness problem when converting ASL to
5  ASL+
6
7 Signed-off-by: Al Stone <ahs3@redhat.com>
8 ---
9  source/compiler/cvparser.c | 5 +++--
10  1 file changed, 3 insertions(+), 2 deletions(-)
11
12 Index: acpica-unix2-20220331/source/compiler/cvparser.c
13 ===================================================================
14 --- acpica-unix2-20220331.orig/source/compiler/cvparser.c
15 +++ acpica-unix2-20220331/source/compiler/cvparser.c
16 @@ -144,6 +144,7 @@ CvInitFileTree (
17      char                    *ChildFilename = NULL;
18      UINT8                   *AmlStart;
19      UINT32                  AmlLength;
20 +    UINT32                  TableLength = AcpiUtReadUint32 (&Table->Length);
21  
22  
23      if (!AcpiGbl_CaptureComments)
24 @@ -152,7 +153,7 @@ CvInitFileTree (
25      }
26  
27  
28 -    AmlLength = Table->Length - sizeof (ACPI_TABLE_HEADER);
29 +    AmlLength = TableLength - sizeof (ACPI_TABLE_HEADER);
30      AmlStart = ((UINT8 *) Table + sizeof (ACPI_TABLE_HEADER));
31  
32      CvDbgPrint ("AmlLength: %x\n", AmlLength);
33 @@ -162,7 +163,7 @@ CvInitFileTree (
34      AcpiGbl_FileTreeRoot = AcpiOsAcquireObject (AcpiGbl_FileCache);
35  
36      AcpiGbl_FileTreeRoot->FileStart = (char *)(AmlStart);
37 -    AcpiGbl_FileTreeRoot->FileEnd = (char *)(AmlStart + Table->Length);
38 +    AcpiGbl_FileTreeRoot->FileEnd = (char *)(AmlStart + TableLength);
39      AcpiGbl_FileTreeRoot->Next = NULL;
40      AcpiGbl_FileTreeRoot->Parent = NULL;
41      AcpiGbl_FileTreeRoot->Filename = (char *)(AmlStart+2);
This page took 0.058803 seconds and 3 git commands to generate.