bash-003-patchlevel29.patch 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-029 with
  2. a slight tweak for the patch prefix.
  3. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
  4. BASH PATCH REPORT
  5. =================
  6. Bash-Release: 4.3
  7. Patch-ID: bash43-029
  8. Bug-Reported-by: Michal Zalewski <lcamtuf@coredump.cx>
  9. Bug-Reference-ID:
  10. Bug-Reference-URL:
  11. Bug-Description:
  12. When bash is parsing a function definition that contains a here-document
  13. delimited by end-of-file (or end-of-string), it leaves the closing delimiter
  14. uninitialized. This can result in an invalid memory access when the parsed
  15. function is later copied.
  16. Patch (apply with `patch -p0'):
  17. *** a/make_cmd.c 2011-12-16 08:08:01.000000000 -0500
  18. --- b/make_cmd.c 2014-10-02 11:24:23.000000000 -0400
  19. ***************
  20. *** 693,696 ****
  21. --- 693,697 ----
  22. temp->redirector = source;
  23. temp->redirectee = dest_and_filename;
  24. + temp->here_doc_eof = 0;
  25. temp->instruction = instruction;
  26. temp->flags = 0;
  27. *** a/copy_cmd.c 2009-09-11 16:28:02.000000000 -0400
  28. --- b/copy_cmd.c 2014-10-02 11:24:23.000000000 -0400
  29. ***************
  30. *** 127,131 ****
  31. case r_reading_until:
  32. case r_deblank_reading_until:
  33. ! new_redirect->here_doc_eof = savestring (redirect->here_doc_eof);
  34. /*FALLTHROUGH*/
  35. case r_reading_string:
  36. --- 127,131 ----
  37. case r_reading_until:
  38. case r_deblank_reading_until:
  39. ! new_redirect->here_doc_eof = redirect->here_doc_eof ? savestring (redirect->here_doc_eof) : 0;
  40. /*FALLTHROUGH*/
  41. case r_reading_string:
  42. *** a/patchlevel.h 2012-12-29 10:47:57.000000000 -0500
  43. --- b/patchlevel.h 2014-03-20 20:01:28.000000000 -0400
  44. ***************
  45. *** 26,30 ****
  46. looks for to find the patch level (for the sccs version string). */
  47. ! #define PATCHLEVEL 28
  48. #endif /* _PATCHLEVEL_H_ */
  49. --- 26,30 ----
  50. looks for to find the patch level (for the sccs version string). */
  51. ! #define PATCHLEVEL 29
  52. #endif /* _PATCHLEVEL_H_ */