bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

BUG: echo builtin does not handle -- arguments


From: Марк Коренберг
Subject: BUG: echo builtin does not handle -- arguments
Date: Mon, 22 Nov 2010 13:33:13 +0500

in latest bash:

suppose script:

for i in "${filenames[@]}"; do
    echo "$i"
done

if malicious user give file name "-e", empty string will be emitted to
stdout, but string "-e" should.

It will be nice if I cat write
echo -- "$i"
as many tool, such as grep, use.

Now, I replace echo "$i" with printf "%s\n" "$i", but it is
workaround, as I think.

-- 
Segmentation fault



reply via email to

[Prev in Thread] Current Thread [Next in Thread]