Merge pull request #4942 from DocLM/gphoto2
[feed/packages.git] / utils / bash / patches / 102-upstream-bash44-002.patch
1 Index: bash-4.4/patchlevel.h
2 ===================================================================
3 --- bash-4.4.orig/patchlevel.h
4 +++ bash-4.4/patchlevel.h
5 @@ -25,6 +25,6 @@
6 regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
7 looks for to find the patch level (for the sccs version string). */
8
9 -#define PATCHLEVEL 1
10 +#define PATCHLEVEL 2
11
12 #endif /* _PATCHLEVEL_H_ */
13 Index: bash-4.4/subst.c
14 ===================================================================
15 --- bash-4.4.orig/subst.c
16 +++ bash-4.4/subst.c
17 @@ -5931,6 +5931,7 @@ read_comsub (fd, quoted, rflag)
18 char *istring, buf[128], *bufp, *s;
19 int istring_index, istring_size, c, tflag, skip_ctlesc, skip_ctlnul;
20 ssize_t bufn;
21 + int nullbyte;
22
23 istring = (char *)NULL;
24 istring_index = istring_size = bufn = tflag = 0;
25 @@ -5938,6 +5939,8 @@ read_comsub (fd, quoted, rflag)
26 for (skip_ctlesc = skip_ctlnul = 0, s = ifs_value; s && *s; s++)
27 skip_ctlesc |= *s == CTLESC, skip_ctlnul |= *s == CTLNUL;
28
29 + nullbyte = 0;
30 +
31 /* Read the output of the command through the pipe. This may need to be
32 changed to understand multibyte characters in the future. */
33 while (1)
34 @@ -5956,7 +5959,11 @@ read_comsub (fd, quoted, rflag)
35 if (c == 0)
36 {
37 #if 1
38 - internal_warning ("%s", _("command substitution: ignored null byte in input"));
39 + if (nullbyte == 0)
40 + {
41 + internal_warning ("%s", _("command substitution: ignored null byte in input"));
42 + nullbyte = 1;
43 + }
44 #endif
45 continue;
46 }