You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
xargs - -E '' sets an empty EOF string instead of disabling it #971
POSIX says: "When eofstr is the null string, the logical end-of-file string capability
shall be disabled." GNU xargs follows this. uutils xargs instead installs "" as the
end-of-file marker. In the default input mode, the first item that unquotes to nothing
('' or "") silently ends the input, so every later item is dropped and the exit status
is 0.
Some("") then reaches EofArgumentReader::new (line 1269), which stops at the first item
equal to "".
Test
In tests/test_xargs.rs, next to xargs_eof:
#[test]fnxargs_empty_eof_string_disables_eof(){ucmd().args(&["-E","","echo"]).pipe_in("one\n\"\"\ntwo three\n").succeeds().stdout_only("one two three\n");}
Reported by Anthropic's OSS Scanner (ANT-2026-DARU0OBW).
Activity
xargs: treat an empty -E/-e/--eof string as disabling the EOF marker