diff options
Diffstat (limited to 'data/bash/bash40-043')
-rw-r--r-- | data/bash/bash40-043 | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/data/bash/bash40-043 b/data/bash/bash40-043 new file mode 100644 index 000000000..0ebacfb68 --- /dev/null +++ b/data/bash/bash40-043 @@ -0,0 +1,59 @@ + BASH PATCH REPORT + ================= + +Bash-Release: 4.0 +Patch-ID: bash40-043 + +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 (apply with `patch -p0'): + +*** ../bash-4.0.42/make_cmd.c 2009-01-04 14:32:38.000000000 -0500 +--- make_cmd.c 2014-10-02 11:36:55.000000000 -0400 +*************** +*** 681,684 **** +--- 681,685 ---- + temp->redirector = source; + temp->redirectee = dest_and_filename; ++ temp->here_doc_eof = 0; + temp->instruction = instruction; + temp->flags = 0; +*** ../bash-4.0.42/copy_cmd.c 2009-01-04 14:32:23.000000000 -0500 +--- copy_cmd.c 2014-10-02 11:36:55.000000000 -0400 +*************** +*** 119,123 **** + case r_reading_until: + case r_deblank_reading_until: +! new_redirect->here_doc_eof = savestring (redirect->here_doc_eof); + /*FALLTHROUGH*/ + case r_reading_string: +--- 119,123 ---- + 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-4.0/patchlevel.h 2009-01-04 14:32:40.000000000 -0500 +--- patchlevel.h 2009-02-22 16:11:31.000000000 -0500 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 42 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 43 + + #endif /* _PATCHLEVEL_H_ */ |