bash52-008.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 5.2
  4. Patch-ID: bash52-008
  5. Bug-Reported-by: Glenn Jackman <glenn.jackman@gmail.com>
  6. Bug-Reference-ID: <CAFC8ewQDx7hzNJzveuJ5o4FWo=ij7MzckiJVN_6NXjp504QZeg@mail.gmail.com>
  7. Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00095.html
  8. Bug-Description:
  9. Array subscript expansion can inappropriately quote brackets if the expression
  10. contains < or >.
  11. Patch (apply with `patch -p0'):
  12. *** ../bash-20221015/subst.c 2022-10-18 10:47:33.000000000 -0500
  13. --- subst.c 2022-10-20 11:41:07.000000000 -0500
  14. ***************
  15. *** 3820,3823 ****
  16. --- 3820,3827 ----
  17. #endif
  18. + /* We don't perform process substitution in arithmetic expressions, so don't
  19. + bother checking for it. */
  20. + #define ARITH_EXP_CHAR(s) (s == '$' || s == '`' || s == CTLESC || s == '~')
  21. +
  22. /* If there are any characters in STRING that require full expansion,
  23. then call FUNC to expand STRING; otherwise just perform quote
  24. ***************
  25. *** 4029,4033 ****
  26. while (string[i])
  27. {
  28. ! if (EXP_CHAR (string[i]))
  29. break;
  30. else if (string[i] == '\'' || string[i] == '\\' || string[i] == '"')
  31. --- 4033,4037 ----
  32. while (string[i])
  33. {
  34. ! if (ARITH_EXP_CHAR (string[i]))
  35. break;
  36. else if (string[i] == '\'' || string[i] == '\\' || string[i] == '"')
  37. *** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
  38. --- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
  39. ***************
  40. *** 26,30 ****
  41. looks for to find the patch level (for the sccs version string). */
  42. ! #define PATCHLEVEL 7
  43. #endif /* _PATCHLEVEL_H_ */
  44. --- 26,30 ----
  45. looks for to find the patch level (for the sccs version string). */
  46. ! #define PATCHLEVEL 8
  47. #endif /* _PATCHLEVEL_H_ */