Correct an ARMv7 patch

Signed-off-by: Al Stone <ahs3@redhat.com>
This commit is contained in:
Al Stone 2020-02-25 11:56:15 -07:00
parent a203640b28
commit a3576b784d

View File

@ -1,16 +1,28 @@
On ARMv7, GCC catches this particular problem and reports trying
to copy a string into a space too small; it counts the terminating
NULL as part of the char[].
diff -Naur acpica-unix2-20200214.orig/source/components/utilities/utstring.c acpica-unix2-20200214/source/components/utilities/utstring.c diff -Naur acpica-unix2-20200214.orig/source/components/utilities/utstring.c acpica-unix2-20200214/source/components/utilities/utstring.c
--- acpica-unix2-20200214.orig/source/components/utilities/utstring.c 2020-02-14 10:33:55.000000000 -0700 --- acpica-unix2-20200214.orig/source/components/utilities/utstring.c 2020-02-14 10:33:55.000000000 -0700
+++ acpica-unix2-20200214/source/components/utilities/utstring.c 2020-02-24 16:52:24.623218044 -0700 +++ acpica-unix2-20200214/source/components/utilities/utstring.c 2020-02-25 11:21:31.329016004 -0700
@@ -185,7 +185,7 @@ @@ -185,7 +185,7 @@
{ {
UINT32 i; UINT32 i;
BOOLEAN FoundBadChar = FALSE; BOOLEAN FoundBadChar = FALSE;
- UINT32 OriginalName; - UINT32 OriginalName;
+ char OriginalName[ACPI_NAMESEG_SIZE+1]; + char OriginalName[ACPI_NAMESEG+SIZE+1];
ACPI_FUNCTION_NAME (UtRepairName); ACPI_FUNCTION_NAME (UtRepairName);
@@ -228,13 +228,13 @@
{
ACPI_WARNING ((AE_INFO,
"Invalid character(s) in name (0x%.8X), repaired: [%4.4s]",
- OriginalName, Name));
+ (unsigned int)OriginalName, Name));
}
else
{
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"Invalid character(s) in name (0x%.8X), repaired: [%4.4s]",
- OriginalName, Name));
+ (unsigned int)OriginalName, Name));
}
}
}