mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-26 04:35:41 +03:00
Ports: Remove spaces in specifier in 2 printf calls in acpica-tools port
The specifiers are badly written and lead to a crash when using iASL. This happens because our printf doesn't understand how to handle a space between the percent symbol and the actual formatted type specifier after it. To fix this, we just remove the spaces in a new patch file.
This commit is contained in:
parent
cf68e01970
commit
606cfc4d48
Notes:
sideshowbarker
2024-07-18 05:01:22 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/606cfc4d48 Pull-request: https://github.com/SerenityOS/serenity/pull/14117
@ -1,7 +1,7 @@
|
||||
From bf6a3c66f9f4a536ad7bab3eb7f149c7062de851 Mon Sep 17 00:00:00 2001
|
||||
From: Liav A <liavalb@gmail.com>
|
||||
Date: Fri, 27 May 2022 10:18:35 +0300
|
||||
Subject: [PATCH 1/2] Stop compiler warnings on dangling pointer
|
||||
Subject: [PATCH 1/3] Stop compiler warnings on dangling pointer
|
||||
|
||||
---
|
||||
source/components/utilities/utdebug.c | 2 +-
|
||||
|
@ -1,7 +1,7 @@
|
||||
From a62c4eb1dcf574cd1f02224cd1120e3435864413 Mon Sep 17 00:00:00 2001
|
||||
From: Liav A <liavalb@gmail.com>
|
||||
Date: Fri, 27 May 2022 10:19:35 +0300
|
||||
Subject: [PATCH 2/2] Disable sprintf debug message due to formatting errors
|
||||
Subject: [PATCH 2/3] Disable sprintf debug message due to formatting errors
|
||||
|
||||
---
|
||||
source/compiler/dtfield.c | 6 +++---
|
||||
|
@ -0,0 +1,34 @@
|
||||
From 0168b0f6eeaa6322b35681a19f4f9d36723955dc Mon Sep 17 00:00:00 2001
|
||||
From: Liav A <liavalb@gmail.com>
|
||||
Date: Fri, 27 May 2022 22:00:38 +0300
|
||||
Subject: [PATCH 3/3] Fix printf bad specifier formatting
|
||||
|
||||
---
|
||||
source/common/dmtable.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/source/common/dmtable.c b/source/common/dmtable.c
|
||||
index 440c5fb..d722e3d 100644
|
||||
--- a/source/common/dmtable.c
|
||||
+++ b/source/common/dmtable.c
|
||||
@@ -977,7 +977,7 @@ AcpiDmLineHeader (
|
||||
{
|
||||
if (ByteLength)
|
||||
{
|
||||
- AcpiOsPrintf ("[%3.3Xh %4.4d% 4d] %28s : ",
|
||||
+ AcpiOsPrintf ("[%3.3Xh %4.4d %4d] %28s : ",
|
||||
Offset, Offset, ByteLength, Name);
|
||||
}
|
||||
else
|
||||
@@ -1011,7 +1011,7 @@ AcpiDmLineHeader2 (
|
||||
}
|
||||
else
|
||||
{
|
||||
- AcpiOsPrintf ("%36s % 3d : ",
|
||||
+ AcpiOsPrintf ("%36s %3d : ",
|
||||
Name, Value);
|
||||
}
|
||||
}
|
||||
--
|
||||
2.36.0
|
||||
|
@ -8,3 +8,7 @@ Use static variable to prevent using a dangling pointer from a previous stack tr
|
||||
## `0002-Disable-sprintf-debug-message-due-to-formatting-erro.patch`
|
||||
|
||||
Disable sprintf debug message with formatting issues.
|
||||
|
||||
## `0003-Fix-printf-bad-specifier-formatting.patch`
|
||||
|
||||
Fix sprintf specifier being written in a bad format leading to iASL to crash.
|
||||
|
Loading…
Reference in New Issue
Block a user