07a490
			     BASH PATCH REPORT
07a490
			     =================
07a490
07a490
Bash-Release:	4.2
07a490
Patch-ID:	bash42-052
07a490
07a490
Bug-Reported-by:	Michal Zalewski <lcamtuf@coredump.cx>
07a490
Bug-Reference-ID:
07a490
Bug-Reference-URL:
07a490
07a490
Bug-Description:
07a490
07a490
When bash is parsing a function definition that contains a here-document
07a490
delimited by end-of-file (or end-of-string), it leaves the closing delimiter
07a490
uninitialized.  This can result in an invalid memory access when the parsed
07a490
function is later copied.
07a490
07a490
Patch (apply with `patch -p0'):
07a490
07a490
*** ../bash-4.2.51/make_cmd.c	2009-09-11 17:26:12.000000000 -0400
07a490
--- make_cmd.c	2014-10-02 11:26:58.000000000 -0400
07a490
***************
07a490
*** 690,693 ****
07a490
--- 690,694 ----
07a490
    temp->redirector = source;
07a490
    temp->redirectee = dest_and_filename;
07a490
+   temp->here_doc_eof = 0;
07a490
    temp->instruction = instruction;
07a490
    temp->flags = 0;
07a490
*** ../bash-4.2.51/copy_cmd.c	2009-09-11 16:28:02.000000000 -0400
07a490
--- copy_cmd.c	2014-10-02 11:26:58.000000000 -0400
07a490
***************
07a490
*** 127,131 ****
07a490
      case r_reading_until:
07a490
      case r_deblank_reading_until:
07a490
!       new_redirect->here_doc_eof = savestring (redirect->here_doc_eof);
07a490
        /*FALLTHROUGH*/
07a490
      case r_reading_string:
07a490
--- 127,131 ----
07a490
      case r_reading_until:
07a490
      case r_deblank_reading_until:
07a490
!       new_redirect->here_doc_eof = redirect->here_doc_eof ? savestring (redirect->here_doc_eof) : 0;
07a490
        /*FALLTHROUGH*/
07a490
      case r_reading_string: