1
0

121-upstream-bash43-021.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 4.3
  4. Patch-ID: bash43-021
  5. Bug-Reported-by: Jared Yanovich <slovichon@gmail.com>
  6. Bug-Reference-ID: <20140625225019.GJ17044@nightderanger.psc.edu>
  7. Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-06/msg00070.html
  8. Bug-Description:
  9. When the readline `revert-all-at-newline' option is set, pressing newline
  10. when the current line is one retrieved from history results in a double free
  11. and a segmentation fault.
  12. Patch (apply with `patch -p0'):
  13. --- a/lib/readline/misc.c
  14. +++ b/lib/readline/misc.c
  15. @@ -461,6 +461,7 @@ _rl_revert_all_lines ()
  16. saved_undo_list = 0;
  17. /* Set up rl_line_buffer and other variables from history entry */
  18. rl_replace_from_history (entry, 0); /* entry->line is now current */
  19. + entry->data = 0; /* entry->data is now current undo list */
  20. /* Undo all changes to this history entry */
  21. while (rl_undo_list)
  22. rl_do_undo ();
  23. @@ -468,7 +469,6 @@ _rl_revert_all_lines ()
  24. the timestamp. */
  25. FREE (entry->line);
  26. entry->line = savestring (rl_line_buffer);
  27. - entry->data = 0;
  28. }
  29. entry = previous_history ();
  30. }
  31. --- a/patchlevel.h
  32. +++ b/patchlevel.h
  33. @@ -25,6 +25,6 @@
  34. regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
  35. looks for to find the patch level (for the sccs version string). */
  36. -#define PATCHLEVEL 20
  37. +#define PATCHLEVEL 21
  38. #endif /* _PATCHLEVEL_H_ */