[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bash-3.0 Official Patch 21
From: |
Chet Ramey |
Subject: |
Bash-3.0 Official Patch 21 |
Date: |
Thu, 2 Oct 2014 22:45:41 -0400 |
BASH PATCH REPORT
=================
Bash-Release: 3.0
Patch-ID: bash30-021
Bug-Reported-by: Michal Zalewski <lcamtuf@coredump.cx>
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.0.20/make_cmd.c 2003-12-19 15:46:56.000000000 -0500
--- make_cmd.c 2014-10-02 11:56:35.000000000 -0400
***************
*** 666,669 ****
--- 666,670 ----
temp->redirector = source;
temp->redirectee = dest_and_filename;
+ temp->here_doc_eof = 0;
temp->instruction = instruction;
temp->flags = 0;
*** ../bash-3.0.20/copy_cmd.c 2003-10-07 11:43:44.000000000 -0400
--- copy_cmd.c 2014-10-02 11:56:35.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.0/patchlevel.h Wed Aug 22 08:05:39 2001
--- patchlevel.h Thu Sep 2 15:04:32 2004
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 20
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 21
#endif /* _PATCHLEVEL_H_ */
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Bash-3.0 Official Patch 21,
Chet Ramey <=