[LTP] binfmt_misc02.sh: Fix interpreter with uutils/coreutils

linuxtestproject.agent@gmail.com linuxtestproject.agent@gmail.com
Thu Oct 22 15:36:00 CEST 2026


Hi Kuan-Ying,

On 12 Oct 2026, Kuan-Ying Lee wrote:
> binfmt_misc02.sh: Fix interpreter with uutils/coreutils

> +	printf '#!/bin/sh\nexec %s "$1"\n' "$(command -v cat)" > "$interp" ||
> +		tst_brk TBROK "Failed to write $interp"

The resolved cat pathname is inserted into the wrapper without shell
quoting. With cat in a PATH directory containing a space, the wrapper
executes a truncated pathname and subtests 1-4 incorrectly fail.
Generate 'exec cat "$1"' instead, or shell-quote the resolved pathname.

Verdict - Needs revision

---
Note:

The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.

Regards,
LTP AI Reviewer


More information about the ltp mailing list