[Toybox] [PATCH] sh: pass "\" to the later app

Chet Ramey chet.ramey at case.edu
Wed Jun 21 06:17:09 PDT 2023


On 6/18/23 5:28 PM, Rob Landley wrote:

> Where did the FF come from?
> 
> $ bash -c $'cat<<0\n\\' | hd
> bash: line 1: warning: here-document at line 0 delimited by end-of-file (wanted `0')
> 00000000  5c ff 0a                                          |\..|
> 00000003

If I had to guess, I'd say the EOF (-1) sentinel leaked into the string and
came out as an unsigned char (0xff). That's pretty clearly a bug.

Chet

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



More information about the Toybox mailing list