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

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