psss / rpms / bash

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