bash52-005.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 5.2
  4. Patch-ID: bash52-005
  5. Bug-Reported-by: Justin Wood (Callek) <callek@gmail.com>
  6. Bug-Reference-ID: <CANBDKY9fp2yiXONP7RY4kNuRteuovUebxSJaqePHeu7cyaFS9Q@mail.gmail.com>
  7. Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00088.html
  8. Bug-Description:
  9. Null pattern substitution replacement strings can cause a crash.
  10. Patch (apply with `patch -p0'):
  11. *** ../bash-5.2-patched/subst.c 2022-10-05 10:22:02.000000000 -0400
  12. --- subst.c 2022-10-13 16:57:26.000000000 -0400
  13. ***************
  14. *** 8966,8970 ****
  15. }
  16. else if (*string == 0 && (match_pattern (string, pat, mtype, &s, &e) != 0))
  17. ! return ((mflags & MATCH_EXPREP) ? strcreplace (rep, '&', "", 2) : savestring (rep));
  18. ret = (char *)xmalloc (rsize = 64);
  19. --- 8966,8971 ----
  20. }
  21. else if (*string == 0 && (match_pattern (string, pat, mtype, &s, &e) != 0))
  22. ! return (mflags & MATCH_EXPREP) ? strcreplace (rep, '&', "", 2)
  23. ! : (rep ? savestring (rep) : savestring (""));
  24. ret = (char *)xmalloc (rsize = 64);
  25. *** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
  26. --- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
  27. ***************
  28. *** 26,30 ****
  29. looks for to find the patch level (for the sccs version string). */
  30. ! #define PATCHLEVEL 4
  31. #endif /* _PATCHLEVEL_H_ */
  32. --- 26,30 ----
  33. looks for to find the patch level (for the sccs version string). */
  34. ! #define PATCHLEVEL 5
  35. #endif /* _PATCHLEVEL_H_ */