BASH PATCH REPORT
=================
Bash-Release: 3.2
Patch-ID: bash32-056
Bug-Reported-by: Michal Zalewski <
[email protected]>
Bug-Reference-ID:
Bug-Reference-URL:
Bug-Description:
When bash is parsing a function definition that contains a here-document
delimited by end-of-file (or end-of-string), it leaves the closing delimiter
uninitialized. This can result in an invalid memory access when the parsed
function is later copied.
Patch:
*** ../bash-3.2.55/make_cmd.c 2006-09-12 09:21:22.000000000 -0400
--- make_cmd.c 2014-10-02 11:41:40.000000000 -0400
***************
*** 677,680 ****
--- 677,681 ----
temp->redirector = source;
temp->redirectee = dest_and_filename;
+ temp->here_doc_eof = 0;
temp->instruction = instruction;
temp->flags = 0;
*** ../bash-3.2.55/copy_cmd.c 2003-10-07 11:43:44.000000000 -0400
--- copy_cmd.c 2014-10-02 11:41:40.000000000 -0400
***************
*** 117,121 ****
case r_reading_until:
case r_deblank_reading_until:
! new_redirect->here_doc_eof = savestring (redirect->here_doc_eof);
/*FALLTHROUGH*/
case r_reading_string:
--- 117,121 ----
case r_reading_until:
case r_deblank_reading_until:
! new_redirect->here_doc_eof = redirect->here_doc_eof ? savestring (redirect->here_doc_eof) : 0;
/*FALLTHROUGH*/
case r_reading_string:
*** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006
--- patchlevel.h Mon Oct 16 14:22:54 2006
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 55
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 56
#endif /* _PATCHLEVEL_H_ */