2
1

bash31-005 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 3.1
  4. Patch-ID: bash31-005
  5. Bug-Reported-by:
  6. Bug-Reference-ID:
  7. Bug-Reference-URL:
  8. Bug-Description:
  9. When tilde expansion fails, POSIX leaves it unspecified whether or not the
  10. word undergoes the additional word expansions. Bash-3.1 as distributed
  11. skipped the rest of the expansions; this patch restores the bash-3.0 behavior.
  12. This means that something like
  13. USER=ratbert
  14. echo ~$USER
  15. will echo `~ratbert' rather than `~$USER'.
  16. Patch:
  17. *** bash-3.1/subst.c Mon Oct 24 09:51:13 2005
  18. --- bash-3.1/subst.c Fri Dec 30 12:11:53 2005
  19. ***************
  20. *** 6796,6799 ****
  21. --- 6823,6832 ----
  22. {
  23. temp1 = bash_tilde_expand (temp, tflag);
  24. + if (temp1 && *temp1 == '~' && STREQ (temp, temp1))
  25. + {
  26. + FREE (temp);
  27. + FREE (temp1);
  28. + goto add_character; /* tilde expansion failed */
  29. + }
  30. free (temp);
  31. temp = temp1;
  32. *** bash-3.1/patchlevel.h Wed Jul 20 13:58:20 2005
  33. --- bash-3.1/patchlevel.h Wed Dec 7 13:48:42 2005
  34. ***************
  35. *** 26,30 ****
  36. looks for to find the patch level (for the sccs version string). */
  37. ! #define PATCHLEVEL 4
  38. #endif /* _PATCHLEVEL_H_ */
  39. --- 26,30 ----
  40. looks for to find the patch level (for the sccs version string). */
  41. ! #define PATCHLEVEL 5
  42. #endif /* _PATCHLEVEL_H_ */