chiark / gitweb /
Disable all exported shell functions
[bash.git] / debian / patches / bash42-004.diff
1 # DP: bash-4.2 upstream patch 004
2
3                              BASH PATCH REPORT
4                              =================
5
6 Bash-Release:   4.2
7 Patch-ID:       bash42-004
8
9 Bug-Reported-by:        Mike Frysinger <vapier@gentoo.org>
10 Bug-Reference-ID:       <201102182106.17834.vapier@gentoo.org>
11 Bug-Reference-URL:      http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00222.html
12
13 Bug-Description:
14
15 When used in contexts where word splitting and quote removal were not
16 performed, such as pattern removal or pattern substitution, empty strings
17 (either literal or resulting from quoted variables that were unset or
18 null) were not matched correctly, resulting in failure.
19
20 Patch (apply with `patch -p0'):
21
22 --- a/bash/patchlevel.h
23 +++ b/bash/patchlevel.h
24 @@ -25,6 +25,6 @@
25     regexp `^#define[   ]*PATCHLEVEL', since that's what support/mkversion.sh
26     looks for to find the patch level (for the sccs version string). */
27  
28 -#define PATCHLEVEL 3
29 +#define PATCHLEVEL 4
30  
31  #endif /* _PATCHLEVEL_H_ */
32 --- a/bash/subst.c
33 +++ b/bash/subst.c
34 @@ -3373,7 +3373,7 @@
35    if (string == 0 || *string == '\0')
36      return (WORD_LIST *)NULL;
37  
38 -  td.flags = 0;
39 +  td.flags = W_NOSPLIT2;               /* no splitting, remove "" and '' */
40    td.word = string;
41    tresult = call_expand_word_internal (&td, quoted, 1, dollar_at_p, has_dollar_at);
42    return (tresult);