summaryrefslogtreecommitdiffstats
path: root/patches/source/bash/bash-4.3-patches/bash43-001
blob: ea1c6b265336f3f917ded12ccfef67ab435b0af1 (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
58
			     BASH PATCH REPORT
			     =================

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

Bug-Reported-by:	NBaH <nbah@sfr.fr>
Bug-Reference-ID:	<ler0b5$iu9$1@speranza.aioe.org>
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2014-02/msg00092.html

Bug-Description:

A missing check for a valid option prevented `test -R' from working.  There
is another problem that causes bash to look up the wrong variable name when
processing the argument to `test -R'.

Patch (apply with `patch -p0'):

*** ../bash-4.3/test.c	2014-02-04 16:52:58.000000000 -0500
--- test.c	2014-02-28 21:22:44.000000000 -0500
***************
*** 647,652 ****
  
      case 'R':
!       v = find_variable (arg);
!       return (v && invisible_p (v) == 0 && var_isset (v) && nameref_p (v) ? TRUE : FALSE);
      }
  
--- 647,652 ----
  
      case 'R':
!       v = find_variable_noref (arg);
!       return ((v && invisible_p (v) == 0 && var_isset (v) && nameref_p (v)) ? TRUE : FALSE);
      }
  
***************
*** 724,727 ****
--- 724,728 ----
      case 'u': case 'v': case 'w': case 'x': case 'z':
      case 'G': case 'L': case 'O': case 'S': case 'N':
+     case 'R':
        return (1);
      }
*** ../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 0
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 1
  
  #endif /* _PATCHLEVEL_H_ */