2
1

bash32-023 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 3.2
  4. Patch-ID: bash32-023
  5. Bug-Reported-by: Chet Ramey <chet.ramey@cwru.edu>
  6. Bug-Reference-ID:
  7. Bug-Reference-URL:
  8. Bug-Description:
  9. When an error occurs during the pattern removal word expansion, the shell
  10. can free unallocated memory or free memory multiple times.
  11. Patch:
  12. *** ../bash-3.2-patched/subst.c Tue Apr 3 16:47:19 2007
  13. --- bash-3.2/subst.c Tue Jul 17 09:45:11 2007
  14. ***************
  15. *** 3975,3979 ****
  16. patstr++;
  17. ! pattern = getpattern (patstr, quoted, 1);
  18. temp1 = (char *)NULL; /* shut up gcc */
  19. --- 4008,4016 ----
  20. patstr++;
  21. ! /* Need to pass getpattern newly-allocated memory in case of expansion --
  22. ! the expansion code will free the passed string on an error. */
  23. ! temp1 = savestring (patstr);
  24. ! pattern = getpattern (temp1, quoted, 1);
  25. ! free (temp1);
  26. temp1 = (char *)NULL; /* shut up gcc */
  27. *** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006
  28. --- bash-3.2/patchlevel.h Mon Oct 16 14:22:54 2006
  29. ***************
  30. *** 26,30 ****
  31. looks for to find the patch level (for the sccs version string). */
  32. ! #define PATCHLEVEL 22
  33. #endif /* _PATCHLEVEL_H_ */
  34. --- 26,30 ----
  35. looks for to find the patch level (for the sccs version string). */
  36. ! #define PATCHLEVEL 23
  37. #endif /* _PATCHLEVEL_H_ */