bash52-021.patch 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 5.2
  4. Patch-ID: bash52-021
  5. Bug-Reported-by: Norbert Lange <nolange79@gmail.com>
  6. Bug-Reference-ID: <CADYdroPZFdVZSL6KkhqkAPgKKopbsLQVSm7_TvLCwadL2=UAWw@mail.gmail.com>
  7. Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-12/msg00046.html
  8. Bug-Description:
  9. There is an off-by-one error that causes command substitutions to fail when
  10. they appear in a word expansion inside a here-document.
  11. Patch (apply with `patch -p0'):
  12. *** ../bash-5.2-patched/subst.c 2022-12-13 12:08:58.000000000 -0500
  13. --- subst.c 2022-12-14 09:09:53.000000000 -0500
  14. ***************
  15. *** 1694,1698 ****
  16. CHECK_STRING_OVERRUN (i, si, slen, c);
  17. ! tlen = si - i - 1;
  18. RESIZE_MALLOCED_BUFFER (result, result_index, tlen + 4, result_size, 64);
  19. result[result_index++] = c;
  20. --- 1699,1703 ----
  21. CHECK_STRING_OVERRUN (i, si, slen, c);
  22. ! tlen = si - i - 2;
  23. RESIZE_MALLOCED_BUFFER (result, result_index, tlen + 4, result_size, 64);
  24. result[result_index++] = c;
  25. ***************
  26. *** 1714,1718 ****
  27. CHECK_STRING_OVERRUN (i, si, slen, c);
  28. ! tlen = si - i - 1;
  29. RESIZE_MALLOCED_BUFFER (result, result_index, tlen + 4, result_size, 64);
  30. result[result_index++] = c;
  31. --- 1719,1723 ----
  32. CHECK_STRING_OVERRUN (i, si, slen, c);
  33. ! tlen = si - i - 2;
  34. RESIZE_MALLOCED_BUFFER (result, result_index, tlen + 4, result_size, 64);
  35. result[result_index++] = c;
  36. *** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
  37. --- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
  38. ***************
  39. *** 26,30 ****
  40. looks for to find the patch level (for the sccs version string). */
  41. ! #define PATCHLEVEL 20
  42. #endif /* _PATCHLEVEL_H_ */
  43. --- 26,30 ----
  44. looks for to find the patch level (for the sccs version string). */
  45. ! #define PATCHLEVEL 21
  46. #endif /* _PATCHLEVEL_H_ */