On 1/3/22 6:02 PM, Ángel wrote:
Or, an even simpler one (assuming a utf-8 locale, like almost everyone uses
these days):
$ printf "%511s\xc3\xa4" | ./bash -c 'a="$(echo a)"; d=$(cat); echo "$d"' | sed
's/^ *//'
Ö�
where it should have output:
ä
Even with this reproducer, I was unable to get it to happen on RHEL7 with
an unpatched bash-5.1 (en_US.UTF-8, de_DE.UTF-8). I was never able to get
it to happen using Frank's test case. It doesn't seem easy to reproduce.
As for patching the systems, I think this deserves being patched even
on stable distros. Albeit I would prefer that Chet released an official
patch first.
I did. The question is what the distros do with it. The example Frank
used -- Debian stable -- was 8 patches behind when he sent the report, and
is 12 behind now. Whether or not we think patches `deserve' to be applied
by the distros doesn't seem to count for much.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/