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 <[email protected]>
---
 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

-- 
You received this message because you are subscribed to the Google Groups "EFI 
Boot Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/efibootguard-dev/68d91c2a.9/WKaRderMq8aFjb%25philip.schildkamp%40uni-koeln.de.

Reply via email to