Blame SOURCES/bash-4.4-patch-2.patch

50ece2
From 280bd77d8d3e7f7c90c9fa07de3d1e8f8e18ac29 Mon Sep 17 00:00:00 2001
50ece2
From: Chet Ramey <chet.ramey@case.edu>
50ece2
Date: Mon, 14 Nov 2016 14:27:06 -0500
50ece2
Subject: [PATCH] Bash-4.4 patch 2
50ece2
50ece2
---
50ece2
 patchlevel.h | 2 +-
50ece2
 subst.c      | 9 ++++++++-
50ece2
 2 files changed, 9 insertions(+), 2 deletions(-)
50ece2
50ece2
diff --git a/patchlevel.h b/patchlevel.h
50ece2
index 40db1a3..a988d85 100644
50ece2
--- a/patchlevel.h
50ece2
+++ b/patchlevel.h
50ece2
@@ -25,6 +25,6 @@
50ece2
    regexp `^#define[ 	]*PATCHLEVEL', since that's what support/mkversion.sh
50ece2
    looks for to find the patch level (for the sccs version string). */
50ece2
 
50ece2
-#define PATCHLEVEL 1
50ece2
+#define PATCHLEVEL 2
50ece2
 
50ece2
 #endif /* _PATCHLEVEL_H_ */
50ece2
diff --git a/subst.c b/subst.c
50ece2
index f1a4df1..4d498ef 100644
50ece2
--- a/subst.c
50ece2
+++ b/subst.c
50ece2
@@ -5931,6 +5931,7 @@ read_comsub (fd, quoted, rflag)
50ece2
   char *istring, buf[128], *bufp, *s;
50ece2
   int istring_index, istring_size, c, tflag, skip_ctlesc, skip_ctlnul;
50ece2
   ssize_t bufn;
50ece2
+  int nullbyte;
50ece2
 
50ece2
   istring = (char *)NULL;
50ece2
   istring_index = istring_size = bufn = tflag = 0;
50ece2
@@ -5938,6 +5939,8 @@ read_comsub (fd, quoted, rflag)
50ece2
   for (skip_ctlesc = skip_ctlnul = 0, s = ifs_value; s && *s; s++)
50ece2
     skip_ctlesc |= *s == CTLESC, skip_ctlnul |= *s == CTLNUL;
50ece2
 
50ece2
+  nullbyte = 0;
50ece2
+
50ece2
   /* Read the output of the command through the pipe.  This may need to be
50ece2
      changed to understand multibyte characters in the future. */
50ece2
   while (1)
50ece2
@@ -5956,7 +5959,11 @@ read_comsub (fd, quoted, rflag)
50ece2
       if (c == 0)
50ece2
 	{
50ece2
 #if 1
50ece2
-	  internal_warning ("%s", _("command substitution: ignored null byte in input"));
50ece2
+	  if (nullbyte == 0)
50ece2
+	    {
50ece2
+	      internal_warning ("%s", _("command substitution: ignored null byte in input"));
50ece2
+	      nullbyte = 1;
50ece2
+	    }
50ece2
 #endif
50ece2
 	  continue;
50ece2
 	}
50ece2
-- 
50ece2
2.9.3
50ece2