bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CTLESC and CTLNUL not dequoted in exported function definitions


From: Chet Ramey
Subject: Re: CTLESC and CTLNUL not dequoted in exported function definitions
Date: Sun, 9 Apr 2017 20:07:55 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.0

On 4/9/17 6:12 PM, Grisha Levit wrote:
> On Sun, Apr 9, 2017 at 5:56 PM, Chet Ramey <address@hidden> wrote:
>> Thanks for the report and fix.  This is the patch where you could have used
>> dequote_escapes() ;-) .
> 
> Yup, I realized I'd done the previous one incorrectly shortly after writing
> this one, sorry about that.
> 
> But I'm not sure about dequoting the function name, so I wanted to dequote
> just the value, not the whole sting pointed to by q.  In retrospect, maybe
> I should have clarified that issue first:
> 
> $ eval $'\001() { :; }'
> $ declare -F | xxd
> 00000000: 6465 636c 6172 6520 2d66 2001 010a       declare -f ...
>                                      ^^ ^^
> 
> The actual function that's created actually *is* $'\001\001':

No, that's true, and it should be fixed.  At some point, though, you have
to ask yourself what someone would be doing creating a function named ^A.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]