bash-4.2-023.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. BASH PATCH REPORT
  2. =================
  3. Bash-Release: 4.2
  4. Patch-ID: bash42-023
  5. Bug-Reported-by: Ewan Mellor <Ewan.Mellor@eu.citrix.com>
  6. Bug-Reference-ID: <6005BE083BF501439A84DC3523BAC82DC4B964FD12@LONPMAILBOX01.citrite.net>
  7. Bug-Reference-URL:
  8. Bug-Description:
  9. Under some circumstances, an exit trap triggered by a bad substitution
  10. error when errexit is enabled will cause the shell to exit with an
  11. incorrect exit status (0).
  12. Patch (apply with `patch -p0'):
  13. *** ../bash-4.2-patched/subst.c 2011-11-21 12:04:38.000000000 -0500
  14. --- ./subst.c 2012-02-08 13:36:28.000000000 -0500
  15. ***************
  16. *** 7275,7278 ****
  17. --- 7281,7285 ----
  18. case '\0':
  19. bad_substitution:
  20. + last_command_exit_value = EXECUTION_FAILURE;
  21. report_error (_("%s: bad substitution"), string ? string : "??");
  22. FREE (value);
  23. *** ../bash-4.2-patched/error.c 2009-08-21 22:31:31.000000000 -0400
  24. --- ./error.c 2012-02-25 15:54:40.000000000 -0500
  25. ***************
  26. *** 201,205 ****
  27. va_end (args);
  28. if (exit_immediately_on_error)
  29. ! exit_shell (1);
  30. }
  31. --- 201,209 ----
  32. va_end (args);
  33. if (exit_immediately_on_error)
  34. ! {
  35. ! if (last_command_exit_value == 0)
  36. ! last_command_exit_value = 1;
  37. ! exit_shell (last_command_exit_value);
  38. ! }
  39. }
  40. *** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
  41. --- ./patchlevel.h Thu Feb 24 21:41:34 2011
  42. ***************
  43. *** 26,30 ****
  44. looks for to find the patch level (for the sccs version string). */
  45. ! #define PATCHLEVEL 22
  46. #endif /* _PATCHLEVEL_H_ */
  47. --- 26,30 ----
  48. looks for to find the patch level (for the sccs version string). */
  49. ! #define PATCHLEVEL 23
  50. #endif /* _PATCHLEVEL_H_ */