chiark / gitweb /
Disable all exported shell functions
[bash.git] / debian / patches / bash42-021.diff
1                              BASH PATCH REPORT
2                              =================
3
4 Bash-Release:   4.2
5 Patch-ID:       bash42-021
6
7 Bug-Reported-by:        Dan Douglas <ormaaj@gmail.com>
8 Bug-Reference-ID:       <4585554.nZWb4q7YoZ@smorgbox>
9 Bug-Reference-URL:      http://lists.gnu.org/archive/html/bug-bash/2011-12/msg00084.html
10
11 Bug-Description:
12
13 Using `read -N' to assign values to an array can result in NUL values being
14 assigned to some array elements.  These values cause seg faults when referenced
15 later.
16
17 Index: b/bash/builtins/read.def
18 ===================================================================
19 --- a/bash/builtins/read.def
20 +++ b/bash/builtins/read.def
21 @@ -737,7 +737,7 @@
22               xfree (t1);
23             }
24           else
25 -           var = bind_read_variable (varname, t);
26 +           var = bind_read_variable (varname, t ? t : "");
27         }
28        else
29         {
30 @@ -798,7 +798,7 @@
31        xfree (t);
32      }
33    else
34 -    var = bind_read_variable (list->word->word, input_string);
35 +    var = bind_read_variable (list->word->word, input_string ? input_string : "");
36  
37    if (var)
38      {
39 Index: b/bash/patchlevel.h
40 ===================================================================
41 --- a/bash/patchlevel.h
42 +++ b/bash/patchlevel.h
43 @@ -25,6 +25,6 @@
44     regexp `^#define[   ]*PATCHLEVEL', since that's what support/mkversion.sh
45     looks for to find the patch level (for the sccs version string). */
46  
47 -#define PATCHLEVEL 20
48 +#define PATCHLEVEL 21
49  
50  #endif /* _PATCHLEVEL_H_ */