0011-bash50-011.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. From https://ftp.gnu.org/gnu/bash/bash-5.0-patches/bash50-011
  2. Signed-off-by: Pascal de Bruijn <p.debruijn@unilogic.nl>
  3. BASH PATCH REPORT
  4. =================
  5. Bash-Release: 5.0
  6. Patch-ID: bash50-011
  7. Bug-Reported-by: Matt Whitlock
  8. Bug-Reference-ID:
  9. Bug-Reference-URL: https://savannah.gnu.org/support/?109671
  10. Bug-Description:
  11. The conditional command did not perform appropriate quoted null character
  12. removal on its arguments, causing syntax errors and attempts to stat
  13. invalid pathnames.
  14. Patch (apply with `patch -p0'):
  15. *** ../bash-5.0-patched/subst.c 2018-12-22 17:43:37.000000000 -0500
  16. --- b/subst.c 2019-04-14 13:25:41.000000000 -0400
  17. ***************
  18. *** 3626,3630 ****
  19. SPECIAL is 2, this is an rhs argument for the =~ operator, and should
  20. be quoted appropriately for regcomp/regexec. The caller is responsible
  21. ! for removing the backslashes if the unquoted word is needed later. */
  22. char *
  23. cond_expand_word (w, special)
  24. --- 3642,3648 ----
  25. SPECIAL is 2, this is an rhs argument for the =~ operator, and should
  26. be quoted appropriately for regcomp/regexec. The caller is responsible
  27. ! for removing the backslashes if the unquoted word is needed later. In
  28. ! any case, since we don't perform word splitting, we need to do quoted
  29. ! null character removal. */
  30. char *
  31. cond_expand_word (w, special)
  32. ***************
  33. *** 3647,3650 ****
  34. --- 3665,3670 ----
  35. if (special == 0) /* LHS */
  36. {
  37. + if (l->word)
  38. + word_list_remove_quoted_nulls (l);
  39. dequote_list (l);
  40. r = string_list (l);
  41. *** ../bash-5.0/patchlevel.h 2016-06-22 14:51:03.000000000 -0400
  42. --- b/patchlevel.h 2016-10-01 11:01:28.000000000 -0400
  43. ***************
  44. *** 26,30 ****
  45. looks for to find the patch level (for the sccs version string). */
  46. ! #define PATCHLEVEL 10
  47. #endif /* _PATCHLEVEL_H_ */
  48. --- 26,30 ----
  49. looks for to find the patch level (for the sccs version string). */
  50. ! #define PATCHLEVEL 11
  51. #endif /* _PATCHLEVEL_H_ */