]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-4.4 patch 2
authorChet Ramey <chet.ramey@case.edu>
Mon, 14 Nov 2016 19:27:06 +0000 (14:27 -0500)
committerChet Ramey <chet.ramey@case.edu>
Mon, 14 Nov 2016 19:27:06 +0000 (14:27 -0500)
patchlevel.h
subst.c

index 40db1a32c9677acffd4d334ffefd062242f730ba..a988d852644985230969d343fdc0c88a3626f7a4 100644 (file)
@@ -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 1
+#define PATCHLEVEL 2
 
 #endif /* _PATCHLEVEL_H_ */
diff --git a/subst.c b/subst.c
index f1a4df196ca62e088ba9b57f2398891b0b7baad4..4d498ef3646222e3ead4a56b3be1cc25f3e6edbd 100644 (file)
--- a/subst.c
+++ b/subst.c
@@ -5931,6 +5931,7 @@ read_comsub (fd, quoted, rflag)
   char *istring, buf[128], *bufp, *s;
   int istring_index, istring_size, c, tflag, skip_ctlesc, skip_ctlnul;
   ssize_t bufn;
+  int nullbyte;
 
   istring = (char *)NULL;
   istring_index = istring_size = bufn = tflag = 0;
@@ -5938,6 +5939,8 @@ read_comsub (fd, quoted, rflag)
   for (skip_ctlesc = skip_ctlnul = 0, s = ifs_value; s && *s; s++)
     skip_ctlesc |= *s == CTLESC, skip_ctlnul |= *s == CTLNUL;
 
+  nullbyte = 0;
+
   /* Read the output of the command through the pipe.  This may need to be
      changed to understand multibyte characters in the future. */
   while (1)
@@ -5956,7 +5959,11 @@ read_comsub (fd, quoted, rflag)
       if (c == 0)
        {
 #if 1
-         internal_warning ("%s", _("command substitution: ignored null byte in input"));
+         if (nullbyte == 0)
+           {
+             internal_warning ("%s", _("command substitution: ignored null byte in input"));
+             nullbyte = 1;
+           }
 #endif
          continue;
        }