[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] 4.0..devel: fix a problem that unset 'a[`echo 0`]' causes "b
From: |
Chet Ramey |
Subject: |
Re: [PATCH] 4.0..devel: fix a problem that unset 'a[`echo 0`]' causes "bad array subscript" error |
Date: |
Wed, 6 Oct 2021 10:12:04 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:91.0) Gecko/20100101 Thunderbird/91.1.2 |
On 10/5/21 10:48 PM, Koichi Murase wrote:
> [ I initially intended to submit this report after the previous report
> at https://lists.gnu.org/archive/html/bug-bash/2021-10/msg00051.html
> has been settled. I decided to submit this patch now because a
> problem related to this report is mentioned in the above thread. Note
> that this patch bases on the code after applying the patches provided
> at the previous report. ]>
> Bash Version:
> All the versions from 4.0 to devel are affected. The problem should
> be reproduced independent of the machine type.
>
> Description:
>
> « unset -v 'a[`echo 0`]' » fails because the first character « ` »
> of the subscript « `echo 0` » is skipped when checking the ending of
> the array subscript.
Thanks for the comprehensive report and fix.
--
``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/