bash52-013.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 5.2
  4. Patch-ID: bash52-013
  5. Bug-Reported-by: Ralf Oehler <Ralf@Oehler-Privat.de>
  6. Bug-Reference-ID: <20221120140252.2fc6489b@bilbo>
  7. Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-11/msg00082.html
  8. Bug-Description:
  9. Bash can leak memory when referencing a non-existent associative array
  10. element.
  11. Patch (apply with `patch -p0'):
  12. *** ../bash-5.2-patched/subst.c 2022-11-05 17:27:48.000000000 -0400
  13. --- subst.c 2022-11-21 14:42:59.000000000 -0500
  14. ***************
  15. *** 7498,7503 ****
  16. : quote_escapes (temp);
  17. rflags |= W_ARRAYIND;
  18. - if (estatep)
  19. - *estatep = es; /* structure copy */
  20. }
  21. /* Note that array[*] and array[@] expanded to a quoted null string by
  22. --- 7508,7511 ----
  23. ***************
  24. *** 7508,7512 ****
  25. rflags |= W_HASQUOTEDNULL;
  26. ! if (estatep == 0)
  27. flush_eltstate (&es);
  28. }
  29. --- 7516,7522 ----
  30. rflags |= W_HASQUOTEDNULL;
  31. ! if (estatep)
  32. ! *estatep = es; /* structure copy */
  33. ! else
  34. flush_eltstate (&es);
  35. }
  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 12
  42. #endif /* _PATCHLEVEL_H_ */
  43. --- 26,30 ----
  44. looks for to find the patch level (for the sccs version string). */
  45. ! #define PATCHLEVEL 13
  46. #endif /* _PATCHLEVEL_H_ */