You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.5 KiB

  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 5.0
  4. Patch-ID: bash50-012
  5. Bug-Reported-by: lessbug@qq.com
  6. Bug-Reference-ID: <tencent_6AA531D9A5CC4121D86BD5CDA2E0DA98C605@qq.com>
  7. Bug-Reference-URL:
  8. Bug-Description:
  9. When using previous-history to go back beyond the beginning of the history list,
  10. it's possible to move to an incorrect partial line.
  11. Patch (apply with `patch -p0'):
  12. *** a/lib/readline/misc.c 2017-07-07 17:30:12.000000000 -0400
  13. --- b/lib/readline/misc.c 2019-05-16 11:43:46.000000000 -0400
  14. ***************
  15. *** 577,580 ****
  16. --- 590,594 ----
  17. {
  18. HIST_ENTRY *old_temp, *temp;
  19. + int had_saved_line;
  20. if (count < 0)
  21. ***************
  22. *** 589,592 ****
  23. --- 603,607 ----
  24. /* If we don't have a line saved, then save this one. */
  25. + had_saved_line = _rl_saved_line_for_history != 0;
  26. rl_maybe_save_line ();
  27. ***************
  28. *** 612,616 ****
  29. if (temp == 0)
  30. {
  31. ! rl_maybe_unsave_line ();
  32. rl_ding ();
  33. }
  34. --- 627,632 ----
  35. if (temp == 0)
  36. {
  37. ! if (had_saved_line == 0)
  38. ! _rl_free_saved_history_line ();
  39. rl_ding ();
  40. }
  41. *** a/patchlevel.h 2016-06-22 14:51:03.000000000 -0400
  42. --- b/patchlevel.h 2016-10-01 11:01:28.000000000 -0400
  43. ***************
  44. *** 26,30 ****
  45. looks for to find the patch level (for the sccs version string). */
  46. ! #define PATCHLEVEL 11
  47. #endif /* _PATCHLEVEL_H_ */
  48. --- 26,30 ----
  49. looks for to find the patch level (for the sccs version string). */
  50. ! #define PATCHLEVEL 12
  51. #endif /* _PATCHLEVEL_H_ */