From d121f2d7fec21b46dce69d14429862d9075c6bde Mon Sep 17 00:00:00 2001 From: Chet Ramey Date: Sat, 21 Mar 2009 14:38:42 -0400 Subject: [PATCH] Patch-ID: bash40-017 Bug-Reported-by: Lubomir Rintel Bug-Reference-ID: <1237654931.32737.13.camel@localhost.localdomain> Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-03/msg00174.html Bug-Description: Adding a null line to a here-document (e.g., by hitting EOF) causes the shell to dump core attempting to dereference the NULL pointer. This patch, in file bash40-017, was downloaded from ftp.gnu.org on 2011-05-29, and bash40-017.sig was furthermore verified, yielding the following output: gpg: Signature made Mon 23 Mar 2009 11:38:40 AM EDT using DSA key ID 64EA74AB gpg: Good signature from "Chet Ramey " --- parse.y | 2 +- patchlevel.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/parse.y b/parse.y index 51ce1f5..cda5f8b 100644 --- a/parse.y +++ b/parse.y @@ -1879,7 +1879,7 @@ read_secondary_line (remove_quoted_newline) prompt_again (); ret = read_a_line (remove_quoted_newline); #if defined (HISTORY) - if (remember_on_history && (parser_state & PST_HEREDOC)) + if (ret && remember_on_history && (parser_state & PST_HEREDOC)) { /* To make adding the the here-document body right, we need to rely on history_delimiting_chars() returning \n for the first line of diff --git a/patchlevel.h b/patchlevel.h index 277c1b6..aaf85dc 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -25,6 +25,6 @@ regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh looks for to find the patch level (for the sccs version string). */ -#define PATCHLEVEL 16 +#define PATCHLEVEL 17 #endif /* _PATCHLEVEL_H_ */ -- 2.11.4.GIT