aee78a2f21e4977dc8071f9cdf33c6777a1ca99a
[packages.git] / utils / bash / patches / 113-upstream-bash42-013.patch
1                              BASH PATCH REPORT
2                              =================
3
4 Bash-Release:   4.2
5 Patch-ID:       bash42-013
6
7 Bug-Reported-by:        Marten Wikstrom <marten.wikstrom@keystream.se>
8 Bug-Reference-ID:       <BANLkTikKECAh94ZEX68iQvxYuPeEM_xoSQ@mail.gmail.com>
9 Bug-Reference-URL:      http://lists.gnu.org/archive/html/bug-bash/2011-05/msg00049.html
10
11 Bug-Description:
12
13 An off-by-one error caused the shell to skip over CTLNUL characters,
14 which are used internally to mark quoted null strings.  The effect
15 was to have stray 0x7f characters left after expanding words like
16 """"""""aa.
17
18 Patch (apply with `patch -p0'):
19
20 --- a/subst.c
21 +++ b/subst.c
22 @@ -3706,7 +3706,10 @@ remove_quoted_nulls (string)
23             break;
24         }
25        else if (string[i] == CTLNUL)
26 -       i++;
27 +       {
28 +         i++;
29 +         continue;
30 +       }
31  
32        prev_i = i;
33        ADVANCE_CHAR (string, slen, i);
34 --- a/patchlevel.h
35 +++ b/patchlevel.h
36 @@ -25,6 +25,6 @@
37     regexp `^#define[   ]*PATCHLEVEL', since that's what support/mkversion.sh
38     looks for to find the patch level (for the sccs version string). */
39  
40 -#define PATCHLEVEL 12
41 +#define PATCHLEVEL 13
42  
43  #endif /* _PATCHLEVEL_H_ */