[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] `bind -x' inside `bind -x' bindings causes execution of rand
From: |
Chet Ramey |
Subject: |
Re: [PATCH] `bind -x' inside `bind -x' bindings causes execution of random strings |
Date: |
Fri, 4 May 2018 15:08:10 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 5/3/18 11:27 AM, Koichi Murase wrote:
> Bash Version: 4.4
> Patch Level: 19
> Release Status: release
>
> Description:
>
> After calls of `bind -x' inside functions called via `bind -x',
> random strings are executed as a command.
>
> This happens in the following way: When the binding is overwritten
> using `bind -x' inside the function called through `bind -x' bindings,
> the original string registered for the binding is deallocated although
> it is still under evaluation. Then the memory block will be allocated
> for other purposes and the content will be rewritten. Finally the new
> data written to the memory block is evaluated.
Thanks for the report. This is a good fix.
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/