[PATCH] fix: resolve segfault when building with busybox/ash

10 views
Skip to first unread message

Philip Schildkamp

unread,
Sep 28, 2025, 7:30:01 AM (2 days ago) Sep 28
to efibootg...@googlegroups.com
This patch resolves a segmentation fault caused by the configure script, when building efibootguard using the BusyBox shell ash. The segmentation fault seems to be caused by the BusyBox shell consuming the opening $(( as the beginning of an arithmetic statement.

To mitigate this, this patch simply inserts one space character between the opening double parenthesis, whereby the BusyBox shell no longer tries to parse this as an arithmetic expression.

Signed-off-by: Philip Schildkamp <philip.s...@uni-koeln.de>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 038930b..d1c932b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -234,7 +234,7 @@ fi
# Note: gnu-efi introduced pkg-config with version 3.0.16
# GNU_EFI_VERSION resolves to gnu-efi's version without dots, e.g., GNU_EFI_VERSION=3016
# gnu-efi versions < 3.0.16 resolve to GNU_EFI_VERSION=0
-AC_SUBST([GNU_EFI_VERSION], [$(($PKG_CONFIG --modversion "gnu-efi" 2>/dev/null || echo 0) | $TR -d '.' )])
+AC_SUBST([GNU_EFI_VERSION], [$( ($PKG_CONFIG --modversion "gnu-efi" 2>/dev/null || echo 0) | $TR -d '.' )])
AC_DEFINE_UNQUOTED([GNU_EFI_VERSION], [${GNU_EFI_VERSION}], [gnu-efi version])

AC_SUBST([OBJCOPY_HAS_EFI_APP_TARGET], [$($OBJCOPY --info | $GREP -q pei- 2>/dev/null && echo "true")])
--
2.49.1

Jan Kiszka

unread,
Sep 29, 2025, 7:51:52 AM (21 hours ago) Sep 29
to Philip Schildkamp, efibootg...@googlegroups.com
Thanks, applied. I just rewrapped the very long lines in the commit message.

Jan

--
Siemens AG, Foundational Technologies
Linux Expert Center
Reply all
Reply to author
Forward
0 new messages