[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Segmentation fault in expassign when PS1='$[U[0S]+=]'
From: |
Chet Ramey |
Subject: |
Re: Segmentation fault in expassign when PS1='$[U[0S]+=]' |
Date: |
Tue, 16 May 2017 16:37:57 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 |
On 5/15/17 3:58 PM, Eduardo Bustamante wrote:
> bash-4.4$ "$[U[0S]+=]"
> bash: 0S: value too great for base (error token is "0S")
>
> It seems like the array index expression causes a longjmp in the
> second case, so it stops evaluating.
>
> Found by fuzzing.
>
> I think this might be similar to
> https://lists.gnu.org/archive/html/bug-bash/2017-05/msg00046.html
> (i.e. ``Segmentation fault in evalerror when xtrace and
> PS4='$[T[$]]'``)
>
> I think the fix *may* be something like:
You're on the right track. Thanks for the report.
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/