[prev in list] [next in list] [prev in thread] [next in thread]
List: bash-bug
Subject: Re: Process substitution can leak CTLESC (0x01) in output
From: Chet Ramey <chet.ramey () case ! edu>
Date: 2017-02-17 16:34:44
Message-ID: 53f07311-716b-b214-f412-36c08a95b152 () case ! edu
[Download RAW message or body]
On 2/16/17 3:36 PM, David Simmons wrote:
> [ Re-sending... it doesn't look like this went through the first time. ]
>
> Bash uses 0x01 (CTLESC) and 0x7F (CTLNUL) bytes within command word strings
> that are passed around internally. If either of these bytes appear in the
> parser input, they are escaped with an extra 0x01 (CTLESC), but such
> escaping is reverted before final use.
>
> When I use ANSI-C quoting to represent these bytes in a process
> substitution context, they appear to be CTLESC-encoded twice in their
> journey through bash. For example, 7F becomes 01 7F which becomes 01 01 01
> 7F, then decoded once as 01 7F before final use. This leads to spurious
> 0x01 bytes.
Thanks for the report. This exists as far back as bash-2.05b, and probably
dates from the initial process substitution implementation in the early
1990s.
It will be fixed in the next release of bash.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic