1 BASH PATCH REPORT |
|
2 ================= |
|
3 |
|
4 Bash-Release: 4.2 |
|
5 Patch-ID: bash42-046 |
|
6 |
|
7 Bug-Reported-by: "Theodoros V. Kalamatianos" <[email protected]> |
|
8 Bug-Reference-ID: <[email protected]> |
|
9 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-01/msg00044.html |
|
10 |
|
11 Bug-Description: |
|
12 |
|
13 Bash-4.2 patch 32 introduced a problem with "$@" and arrays expanding empty |
|
14 positional parameters or array elements when using substring expansion, |
|
15 pattern substitution, or case modfication. The empty parameters or array |
|
16 elements are removed instead of expanding to empty strings (""). |
|
17 |
|
18 Patch (apply with `patch -p0'): |
|
19 |
|
20 *** ../bash-4.2-patched/subst.c 2012-12-31 11:52:56.000000000 -0500 |
|
21 --- subst.c 2014-03-31 14:19:56.000000000 -0400 |
|
22 *************** |
|
23 *** 7243,7247 **** |
|
24 ret = alloc_word_desc (); |
|
25 ret->word = temp1; |
|
26 ! if (temp1 && QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) |
|
27 ret->flags |= W_QUOTED|W_HASQUOTEDNULL; |
|
28 return ret; |
|
29 --- 7243,7253 ---- |
|
30 ret = alloc_word_desc (); |
|
31 ret->word = temp1; |
|
32 ! /* We test quoted_dollar_atp because we want variants with double-quoted |
|
33 ! "$@" to take a different code path. In fact, we make sure at the end |
|
34 ! of expand_word_internal that we're only looking at these flags if |
|
35 ! quoted_dollar_at == 0. */ |
|
36 ! if (temp1 && |
|
37 ! (quoted_dollar_atp == 0 || *quoted_dollar_atp == 0) && |
|
38 ! QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))) |
|
39 ret->flags |= W_QUOTED|W_HASQUOTEDNULL; |
|
40 return ret; |
|
41 *** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 |
|
42 --- patchlevel.h Thu Feb 24 21:41:34 2011 |
|
43 *************** |
|
44 *** 26,30 **** |
|
45 looks for to find the patch level (for the sccs version string). */ |
|
46 |
|
47 ! #define PATCHLEVEL 45 |
|
48 |
|
49 #endif /* _PATCHLEVEL_H_ */ |
|
50 --- 26,30 ---- |
|
51 looks for to find the patch level (for the sccs version string). */ |
|
52 |
|
53 ! #define PATCHLEVEL 46 |
|
54 |
|
55 #endif /* _PATCHLEVEL_H_ */ |
|