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 ${var@E}


From: Chet Ramey
Subject: Re: CTLESC and CTLNUL not dequoted in ${var@E}
Date: Sun, 9 Apr 2017 17:43:43 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.0

On 4/8/17 11:26 PM, Grisha Levit wrote:
> $ x='\001\177'; printf %q ${x@E}
> $'\001\001\001\177'
> 
> Probably just needs:
> 
> --- a/subst.c
> +++ b/subst.c
> @@ -7253,7 +7253,7 @@ string_transform (xc, v, s)
>         break;
>        /* Transformations that modify the variable's value */
>        case 'E':
> -       ret = ansiexpand (s, 0, strlen (s), (int *)0);
> +       ret = dequote_escapes(ansiexpand (s, 0, strlen (s), (int *)0));
>         break;
>        case 'P':
>         ret = decode_prompt_string (s);

Thanks for the report.  The patch is just about right, but introduces a
memory leak.

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/



reply via email to

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