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