bash52-022.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 5.2
  4. Patch-ID: bash52-022
  5. Bug-Reported-by: srobertson@peratonlabs.com
  6. Bug-Reference-ID:
  7. Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-09/msg00049.html
  8. Bug-Description:
  9. It's possible for readline to try to zero out a line that's not null-
  10. terminated, leading to a memory fault.
  11. Patch (apply with `patch -p0'):
  12. *** ../bash-5.2-patched/lib/readline/display.c 2022-04-05 10:47:31.000000000 -0400
  13. --- lib/readline/display.c 2022-12-13 13:11:22.000000000 -0500
  14. ***************
  15. *** 2684,2692 ****
  16. if (visible_line)
  17. ! {
  18. ! temp = visible_line;
  19. ! while (*temp)
  20. ! *temp++ = '\0';
  21. ! }
  22. rl_on_new_line ();
  23. forced_display++;
  24. --- 2735,2740 ----
  25. if (visible_line)
  26. ! memset (visible_line, 0, line_size);
  27. !
  28. rl_on_new_line ();
  29. forced_display++;
  30. *** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
  31. --- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
  32. ***************
  33. *** 26,30 ****
  34. looks for to find the patch level (for the sccs version string). */
  35. ! #define PATCHLEVEL 21
  36. #endif /* _PATCHLEVEL_H_ */
  37. --- 26,30 ----
  38. looks for to find the patch level (for the sccs version string). */
  39. ! #define PATCHLEVEL 22
  40. #endif /* _PATCHLEVEL_H_ */