summaryrefslogtreecommitdiffstats
path: root/package/bash/bash-4.2-021.patch
blob: 82e00fd3be4cbbc9ac473ffe6912d97a1095a54d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
			     BASH PATCH REPORT
			     =================

Bash-Release:	4.2
Patch-ID:	bash42-021

Bug-Reported-by:	Dan Douglas <ormaaj@gmail.com>
Bug-Reference-ID:	<4585554.nZWb4q7YoZ@smorgbox>
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2011-12/msg00084.html

Bug-Description:

Using `read -N' to assign values to an array can result in NUL values being
assigned to some array elements.  These values cause seg faults when referenced
later.

Patch (apply with `patch -p0'):

*** ../bash-4.2-patched/builtins/read.def	2011-11-21 18:03:38.000000000 -0500
--- ./builtins/read.def	2011-12-19 19:52:12.000000000 -0500
***************
*** 738,742 ****
  	    }
  	  else
! 	    var = bind_read_variable (varname, t);
  	}
        else
--- 775,779 ----
  	    }
  	  else
! 	    var = bind_read_variable (varname, t ? t : "");
  	}
        else
***************
*** 799,803 ****
      }
    else
!     var = bind_read_variable (list->word->word, input_string);
  
    if (var)
--- 836,840 ----
      }
    else
!     var = bind_read_variable (list->word->word, input_string ? input_string : "");
  
    if (var)
*** ../bash-4.2-patched/patchlevel.h	Sat Jun 12 20:14:48 2010
--- ./patchlevel.h	Thu Feb 24 21:41:34 2011
***************
*** 26,30 ****
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 20
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 21
  
  #endif /* _PATCHLEVEL_H_ */