Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14091 > unrolled thread

Re: [PATCH] `bind -x' inside `bind -x' bindings causes execution of random strings

Started byChet Ramey <chet.ramey@case.edu>
First post2018-05-04 15:08 -0400
Last post2018-05-04 15:08 -0400
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] `bind -x' inside `bind -x' bindings causes execution of random strings Chet Ramey <chet.ramey@case.edu> - 2018-05-04 15:08 -0400

#14091 — Re: [PATCH] `bind -x' inside `bind -x' bindings causes execution of random strings

FromChet Ramey <chet.ramey@case.edu>
Date2018-05-04 15:08 -0400
SubjectRe: [PATCH] `bind -x' inside `bind -x' bindings causes execution of random strings
Message-ID<mailman.13407.1525460903.27995.bug-bash@gnu.org>
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/

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web