summaryrefslogtreecommitdiffstats
path: root/patches/source/bash/bash-4.3-patches/bash43-036
blob: 5b42c246c1c3a4719cddef32dc818f2e83193f77 (plain) (blame)
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
			     BASH PATCH REPORT
			     =================

Bash-Release:	4.3
Patch-ID:	bash43-036

Bug-Reported-by:	emanuelczirai@cryptolab.net
Bug-Reference-ID:	<f962e4f556da5ebfadaf7afe9c78a8cb@cryptolab.net>
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2015-02/msg00071.html

Bug-Description:

When evaluating and setting integer variables, and the assignment fails to
create a variable (for example, when performing an operation on an array
variable with an invalid subscript), bash attempts to dereference a null
pointer, causing a segmentation violation.

Patch (apply with `patch -p0'):

*** ../bash-20150206/variables.c	2015-01-23 20:39:27.000000000 -0500
--- variables.c	2015-02-19 13:56:12.000000000 -0500
***************
*** 2834,2841 ****
      v = bind_variable (lhs, rhs, 0);
  
!   if (v && isint)
!     VSETATTR (v, att_integer);
! 
!   VUNSETATTR (v, att_invisible);
  
    return (v);
--- 2834,2843 ----
      v = bind_variable (lhs, rhs, 0);
  
!   if (v)
!     {
!       if (isint)
! 	VSETATTR (v, att_integer);
!       VUNSETATTR (v, att_invisible);
!     }
  
    return (v);
*** ../bash-4.3/patchlevel.h	2012-12-29 10:47:57.000000000 -0500
--- patchlevel.h	2014-03-20 20:01:28.000000000 -0400
***************
*** 26,30 ****
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 35
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 36
  
  #endif /* _PATCHLEVEL_H_ */