bash-4.2-028.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 4.2
  4. Patch-ID: bash42-028
  5. Bug-Reported-by: Mark Edgar <medgar123@gmail.com>
  6. Bug-Reference-ID: <CABHMh_3d+ZgO_zaEtYXPwK4P7tC0ghZ4g=Ue_TRpsEMf5YDsqw@mail.gmail.com>
  7. Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-03/msg00109.html
  8. Bug-Description:
  9. When using a word expansion for which the right hand side is evaluated,
  10. certain expansions of quoted null strings include spurious ^? characters.
  11. Patch (apply with `patch -p0'):
  12. *** ../bash-4.2-patched/subst.c 2012-03-11 17:35:13.000000000 -0400
  13. --- ./subst.c 2012-03-20 19:30:13.000000000 -0400
  14. ***************
  15. *** 5810,5813 ****
  16. --- 5810,5823 ----
  17. if (qdollaratp && ((hasdol && quoted) || l->next))
  18. *qdollaratp = 1;
  19. + /* If we have a quoted null result (QUOTED_NULL(temp)) and the word is
  20. + a quoted null (l->next == 0 && QUOTED_NULL(l->word->word)), the
  21. + flags indicate it (l->word->flags & W_HASQUOTEDNULL), and the
  22. + expansion is quoted (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
  23. + (which is more paranoia than anything else), we need to return the
  24. + quoted null string and set the flags to indicate it. */
  25. + if (l->next == 0 && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && QUOTED_NULL(temp) && QUOTED_NULL(l->word->word) && (l->word->flags & W_HASQUOTEDNULL))
  26. + {
  27. + w->flags |= W_HASQUOTEDNULL;
  28. + }
  29. dispose_words (l);
  30. }
  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 27
  37. #endif /* _PATCHLEVEL_H_ */
  38. --- 26,30 ----
  39. looks for to find the patch level (for the sccs version string). */
  40. ! #define PATCHLEVEL 28
  41. #endif /* _PATCHLEVEL_H_ */