[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: unset IFS and ${v=$*} CTLNUL leakage
From: |
Chet Ramey |
Subject: |
Re: unset IFS and ${v=$*} CTLNUL leakage |
Date: |
Wed, 13 Mar 2019 07:39:30 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 |
On 3/8/19 6:09 PM, Grisha Levit wrote:
> A few more that produce \177 in the output, though I'm not sure if
> these have defined output:
>
> $ IFS=$' \t\n' # or any other IFS
> $ set -- ''
> $ recho ${v= "$*" }
> <$'\177'>
>
> $ IFS=''
> $ set -- '' ''
> $ recho ${v= "$*" }
> <$' \177 '>
These were changed last week in the 20190306 update.
> And also variations like the below all have \177 as well, but these
> I'm pretty sure are undefined:
These are all undefined, but there's nothing wrong with doing something
more reasonable than leaving the quoted nulls in there.
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://tiswww.cwru.edu/~chet/