Re: Corrupted multibyte characters in command substitutions

2022-01-08 Thread Chet Ramey

On 1/7/22 7:21 PM, Ángel wrote:


When you mentioned the environment in the previous mail I thought in
the environment block (which you reset with env -i). As for the
environment in general, yes, apparently there are more things that
cause it to be even more random.


The buffer is an auto variable (function local) created on the stack. It
seems to me that the value of the variable adjacent to it on the stack
(`adjacent' is compiler and system dependent) can determine whether or not
that next byte following the buffer affects the mbrtowc() result.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/



Re: Corrupted multibyte characters in command substitutions

2022-01-08 Thread Chet Ramey

On 1/7/22 8:00 PM, Ángel wrote:


I haven't make my mind^W^W^W^W have looked at the other patches and
this one (patch 14) seems the most critical. Patchset 9 as well if the
crash happens in the systemd version shipped in Debian stable.


All the patches fix problems that have resulted in incorrect results for
the people who have encountered them. The point is that distros obviously
use their own criteria for determining what should go into `stable'.


--
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/