bash-4.2-004.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 4.2
  4. Patch-ID: bash42-004
  5. Bug-Reported-by: Mike Frysinger <vapier@gentoo.org>
  6. Bug-Reference-ID: <201102182106.17834.vapier@gentoo.org>
  7. Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00222.html
  8. Bug-Description:
  9. When used in contexts where word splitting and quote removal were not
  10. performed, such as pattern removal or pattern substitution, empty strings
  11. (either literal or resulting from quoted variables that were unset or
  12. null) were not matched correctly, resulting in failure.
  13. Patch (apply with `patch -p0'):
  14. *** ../bash-4.2-patched/subst.c 2011-01-02 16:12:51.000000000 -0500
  15. --- ./subst.c 2011-02-18 22:30:13.000000000 -0500
  16. ***************
  17. *** 3373,3379 ****
  18. if (string == 0 || *string == '\0')
  19. return (WORD_LIST *)NULL;
  20. ! td.flags = 0;
  21. td.word = string;
  22. tresult = call_expand_word_internal (&td, quoted, 1, dollar_at_p, has_dollar_at);
  23. return (tresult);
  24. --- 3373,3379 ----
  25. if (string == 0 || *string == '\0')
  26. return (WORD_LIST *)NULL;
  27. ! td.flags = W_NOSPLIT2; /* no splitting, remove "" and '' */
  28. td.word = string;
  29. tresult = call_expand_word_internal (&td, quoted, 1, dollar_at_p, has_dollar_at);
  30. return (tresult);
  31. *** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
  32. --- ./patchlevel.h Thu Feb 24 21:41:34 2011
  33. ***************
  34. *** 26,30 ****
  35. looks for to find the patch level (for the sccs version string). */
  36. ! #define PATCHLEVEL 3
  37. #endif /* _PATCHLEVEL_H_ */
  38. --- 26,30 ----
  39. looks for to find the patch level (for the sccs version string). */
  40. ! #define PATCHLEVEL 4
  41. #endif /* _PATCHLEVEL_H_ */