7 Bug-Reported-by: Michal Zalewski <lcamtuf@coredump.cx>
13 When bash is parsing a function definition that contains a here-document
14 delimited by end-of-file (or end-of-string), it leaves the closing delimiter
15 uninitialized. This can result in an invalid memory access when the parsed
16 function is later copied.
18 Patch (apply with `patch -p0'):
22 @@ -692,6 +692,7 @@ make_redirection (source, instruction, d
23 /* First do the common cases. */
24 temp->redirector = source;
25 temp->redirectee = dest_and_filename;
26 + temp->here_doc_eof = 0;
27 temp->instruction = instruction;
32 @@ -126,7 +126,7 @@ copy_redirect (redirect)
35 case r_deblank_reading_until:
36 - new_redirect->here_doc_eof = savestring (redirect->here_doc_eof);
37 + new_redirect->here_doc_eof = redirect->here_doc_eof ? savestring (redirect->here_doc_eof) : 0;
39 case r_reading_string:
44 regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
45 looks for to find the patch level (for the sccs version string). */
47 -#define PATCHLEVEL 28
48 +#define PATCHLEVEL 29
50 #endif /* _PATCHLEVEL_H_ */