summaryrefslogtreecommitdiffstats
path: root/source/a/bash/bash-4.3-patches/bash43-021
blob: fd1c945ec109d2d628171f430488fe4358e8a2f7 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
			     BASH PATCH REPORT
			     =================

Bash-Release:	4.3
Patch-ID:	bash43-021

Bug-Reported-by:	Jared Yanovich <slovichon@gmail.com>
Bug-Reference-ID:	<20140625225019.GJ17044@nightderanger.psc.edu>
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2014-06/msg00070.html

Bug-Description:

When the readline `revert-all-at-newline' option is set, pressing newline
when the current line is one retrieved from history results in a double free
and a segmentation fault.

Patch (apply with `patch -p0'):

*** ../bash-4.3-patched/lib/readline/misc.c	2012-09-01 18:03:11.000000000 -0400
--- lib/readline/misc.c	2014-06-30 13:41:19.000000000 -0400
***************
*** 462,465 ****
--- 462,466 ----
  	  /* Set up rl_line_buffer and other variables from history entry */
  	  rl_replace_from_history (entry, 0);	/* entry->line is now current */
+ 	  entry->data = 0;			/* entry->data is now current undo list */
  	  /* Undo all changes to this history entry */
  	  while (rl_undo_list)
***************
*** 469,473 ****
  	  FREE (entry->line);
  	  entry->line = savestring (rl_line_buffer);
- 	  entry->data = 0;
  	}
        entry = previous_history ();
--- 470,473 ----

*** ../bash-4.3/patchlevel.h	2012-12-29 10:47:57.000000000 -0500
--- patchlevel.h	2014-03-20 20:01:28.000000000 -0400
***************
*** 26,30 ****
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 20
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 21
  
  #endif /* _PATCHLEVEL_H_ */