bash32-013 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 3.2
  4. Patch-ID: bash32-013
  5. Bug-Reported-by: Magnus Svensson <msvensson@mysql.com>
  6. Bug-Reference-ID: <45BDC44D.80609@mysql.com>
  7. Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2007-01/msg00002.html
  8. Bug-Description:
  9. Readline neglects to reallocate the array it uses to keep track of wrapped
  10. screen lines when increasing its size. This will eventually result in
  11. segmentation faults when given sufficiently long input.
  12. Patch:
  13. *** ../bash-3.2-patched/lib/readline/display.c Thu Sep 14 14:20:12 2006
  14. --- bash-3.2/lib/readline/display.c Fri Feb 2 20:23:17 2007
  15. ***************
  16. *** 561,574 ****
  17. --- 561,586 ----
  18. wrap_offset = prompt_invis_chars_first_line = 0;
  19. }
  20. + #if defined (HANDLE_MULTIBYTE)
  21. #define CHECK_INV_LBREAKS() \
  22. do { \
  23. if (newlines >= (inv_lbsize - 2)) \
  24. { \
  25. inv_lbsize *= 2; \
  26. inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \
  27. + _rl_wrapped_line = (int *)xrealloc (_rl_wrapped_line, inv_lbsize * sizeof (int)); \
  28. } \
  29. } while (0)
  30. + #else
  31. + #define CHECK_INV_LBREAKS() \
  32. + do { \
  33. + if (newlines >= (inv_lbsize - 2)) \
  34. + { \
  35. + inv_lbsize *= 2; \
  36. + inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \
  37. + } \
  38. + } while (0)
  39. + #endif /* HANDLE_MULTIBYTE */
  40. #if defined (HANDLE_MULTIBYTE)
  41. #define CHECK_LPOS() \
  42. *** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006
  43. --- bash-3.2/patchlevel.h Mon Oct 16 14:22:54 2006
  44. ***************
  45. *** 26,30 ****
  46. looks for to find the patch level (for the sccs version string). */
  47. ! #define PATCHLEVEL 12
  48. #endif /* _PATCHLEVEL_H_ */
  49. --- 26,30 ----
  50. looks for to find the patch level (for the sccs version string). */
  51. ! #define PATCHLEVEL 13
  52. #endif /* _PATCHLEVEL_H_ */