From 4d1af904207d10436561fb228e2abeb653ee73ea Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2026 15:14:01 +0000 Subject: [PATCH] fix: better compatibility under busybox, silence buggy unzlma versions (fix #432) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit built from commit fc34cb729b802d1ea40f8d039381bead971ca1af dated 2026-04-06 17:12:21 +0200 by Stéphane Lesimple (speed47_github@speed47.net) --- spectre-meltdown-checker.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh index 11e7182..213fe79 100755 --- a/spectre-meltdown-checker.sh +++ b/spectre-meltdown-checker.sh @@ -13,7 +13,7 @@ # # Stephane Lesimple # -VERSION='26.32.0406626' +VERSION='26.32.0406634' # --- Common paths and basedirs --- readonly VULN_SYSFS_BASE="/sys/devices/system/cpu/vulnerabilities" @@ -2562,7 +2562,9 @@ try_decompress() { fi pos=${pos%%:*} # shellcheck disable=SC2086 - tail -c+$pos "$6" 2>/dev/null | $3 $4 >"$g_kerneltmp" 2>/dev/null + # wrap in subshell so that if $3 segfaults (e.g. old BusyBox unlzma on random data), + # the "Segmentation fault" message printed by the shell goes to /dev/null + (tail -c+$pos "$6" 2>/dev/null | $3 $4 >"$g_kerneltmp" 2>/dev/null) 2>/dev/null ret=$? if [ ! -s "$g_kerneltmp" ]; then # don't rely on $ret, sometimes it's != 0 but worked @@ -11248,7 +11250,7 @@ if [ -n "$g_mockme" ] && [ "$opt_mock" = 1 ]; then # not a useless use of cat: gzipping cpuinfo directly doesn't work well # shellcheck disable=SC2002 if command -v "base64" >/dev/null 2>&1; then - g_mock_cpuinfo="$(cat /proc/cpuinfo | gzip -c | base64 -w0)" + g_mock_cpuinfo="$(cat /proc/cpuinfo | gzip -c | base64 | tr -d '\n')" elif command -v "uuencode" >/dev/null 2>&1; then g_mock_cpuinfo="$(cat /proc/cpuinfo | gzip -c | uuencode -m - | grep -Fv 'begin-base64' | grep -Fxv -- '====' | tr -d "\n")" fi