Commit 4a37f331 authored by Gustavo Zacarias's avatar Gustavo Zacarias Committed by Peter Korsgaard
Browse files

bash: bump to patchlevel 42

parent 18df1fd0
Loading
Loading
Loading
Loading
+94 −0
Original line number Diff line number Diff line
From http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-034

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

			     BASH PATCH REPORT
			     =================

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

Bug-Reported-by:	Dreamcat4 <dreamcat4@gmail.com>
Bug-Reference-ID:	<CAN39uTpAEs2GFu4ebC_SfSVMRTh-DJ9YanrY4BZZ3OO+CCHjng@mail.gmail.com>
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2015-05/msg00001.html

Bug-Description:

If neither the -f nor -v options is supplied to unset, and a name argument is
found to be a function and unset, subsequent name arguments are not treated as
variables before attempting to unset a function by that name.

Patch (apply with `patch -p0'):

*** a/bash-4.3-patched/builtins/set.def	2013-04-19 07:20:34.000000000 -0400
--- b/builtins/set.def	2015-05-05 13:25:36.000000000 -0400
***************
*** 752,758 ****
--- 797,805 ----
  {
    int unset_function, unset_variable, unset_array, opt, nameref, any_failed;
+   int global_unset_func, global_unset_var;
    char *name;
  
    unset_function = unset_variable = unset_array = nameref = any_failed = 0;
+   global_unset_func = global_unset_var = 0;
  
    reset_internal_getopt ();
***************
*** 762,769 ****
  	{
  	case 'f':
! 	  unset_function = 1;
  	  break;
  	case 'v':
! 	  unset_variable = 1;
  	  break;
  	case 'n':
--- 809,816 ----
  	{
  	case 'f':
! 	  global_unset_func = 1;
  	  break;
  	case 'v':
! 	  global_unset_var = 1;
  	  break;
  	case 'n':
***************
*** 778,782 ****
    list = loptend;
  
!   if (unset_function && unset_variable)
      {
        builtin_error (_("cannot simultaneously unset a function and a variable"));
--- 825,829 ----
    list = loptend;
  
!   if (global_unset_func && global_unset_var)
      {
        builtin_error (_("cannot simultaneously unset a function and a variable"));
***************
*** 796,799 ****
--- 843,849 ----
        name = list->word->word;
  
+       unset_function = global_unset_func;
+       unset_variable = global_unset_var;
+ 
  #if defined (ARRAY_VARS)
        unset_array = 0;

*** a/bash-4.3/patchlevel.h	2012-12-29 10:47:57.000000000 -0500
--- b/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 33
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 34
  
  #endif /* _PATCHLEVEL_H_ */
+67 −0
Original line number Diff line number Diff line
From http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-035

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

			     BASH PATCH REPORT
			     =================

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

Bug-Reported-by:	<romerox.adrian@gmail.com>
Bug-Reference-ID:	<CABV5r3zhPXmSKUe9uedeGc5YFBM2njJ1iVmY2h5neWdQpDBQug@mail.gmail.com>
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2014-08/msg00045.html

Bug-Description:

A locale with a long name can trigger a buffer overflow and core dump.  This
applies on systems that do not have locale_charset in libc, are not using
GNU libiconv, and are not using the libintl that ships with bash in lib/intl.

Patch (apply with `patch -p0'):

*** a/bash-4.3-patched/lib/sh/unicode.c	2014-01-30 16:47:19.000000000 -0500
--- b/lib/sh/unicode.c	2015-05-01 08:58:30.000000000 -0400
***************
*** 79,83 ****
    if (s)
      {
!       strcpy (charsetbuf, s+1);
        t = strchr (charsetbuf, '@');
        if (t)
--- 79,84 ----
    if (s)
      {
!       strncpy (charsetbuf, s+1, sizeof (charsetbuf) - 1);
!       charsetbuf[sizeof (charsetbuf) - 1] = '\0';
        t = strchr (charsetbuf, '@');
        if (t)
***************
*** 85,89 ****
        return charsetbuf;
      }
!   strcpy (charsetbuf, locale);
    return charsetbuf;
  }
--- 86,91 ----
        return charsetbuf;
      }
!   strncpy (charsetbuf, locale, sizeof (charsetbuf) - 1);
!   charsetbuf[sizeof (charsetbuf) - 1] = '\0';
    return charsetbuf;
  }
*** a/bash-4.3/patchlevel.h	2012-12-29 10:47:57.000000000 -0500
--- b/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 34
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 35
  
  #endif /* _PATCHLEVEL_H_ */
+61 −0
Original line number Diff line number Diff line
From http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-036

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

			     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'):

*** a/bash-20150206/variables.c	2015-01-23 20:39:27.000000000 -0500
--- b/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);
*** a/bash-4.3/patchlevel.h	2012-12-29 10:47:57.000000000 -0500
--- b/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_ */
+47 −0
Original line number Diff line number Diff line
From http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-037

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

			     BASH PATCH REPORT
			     =================

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

Bug-Reported-by:	Greg Wooledge <wooledg@eeg.ccf.org>
Bug-Reference-ID:	<20150204144240.GN13956@eeg.ccf.org>
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2015-02/msg00007.html

Bug-Description:

If an associative array uses `@' or `*' as a subscript, `declare -p' produces
output that cannot be reused as input.

Patch (apply with `patch -p0'):

*** a/bash-4.3-patched/assoc.c	2011-11-05 16:39:05.000000000 -0400
--- b/assoc.c	2015-02-04 15:28:25.000000000 -0500
***************
*** 437,440 ****
--- 440,445 ----
  	if (sh_contains_shell_metas (tlist->key))
  	  istr = sh_double_quote (tlist->key);
+ 	else if (ALL_ELEMENT_SUB (tlist->key[0]) && tlist->key[1] == '\0')
+ 	  istr = sh_double_quote (tlist->key);	
  	else
  	  istr = tlist->key;	
*** a/bash-4.3/patchlevel.h	2012-12-29 10:47:57.000000000 -0500
--- b/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 36
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 37
  
  #endif /* _PATCHLEVEL_H_ */
+92 −0
Original line number Diff line number Diff line
From http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-038

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

			     BASH PATCH REPORT
			     =================

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

Bug-Reported-by:	worley@alum.mit.edu (Dale R. Worley)
Bug-Reference-ID:	<201406100051.s5A0pCeB014978@hobgoblin.ariadne.com>
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2014-06/msg00028.html

Bug-Description:

There are a number of instances where `time' is not recognized as a reserved
word when the shell grammar says it should be.

Patch (apply with `patch -p0'):

*** a/bash-4.3-patched/parse.y	2014-04-07 11:56:12.000000000 -0400
--- b/parse.y	2014-06-11 10:25:53.000000000 -0400
***************
*** 2819,2827 ****
      case OR_OR:
      case '&':
      case DO:
      case THEN:
      case ELSE:
      case '{':		/* } */
!     case '(':		/* ) */
      case BANG:		/* ! time pipeline */
      case TIME:		/* time time pipeline */
--- 2819,2832 ----
      case OR_OR:
      case '&':
+     case WHILE:
      case DO:
+     case UNTIL:
+     case IF:
      case THEN:
+     case ELIF:
      case ELSE:
      case '{':		/* } */
!     case '(':		/* )( */
!     case ')':		/* only valid in case statement */
      case BANG:		/* ! time pipeline */
      case TIME:		/* time time pipeline */
*** a/bash-4.3-patched/y.tab.c	2014-10-05 13:52:50.000000000 -0400
--- b/y.tab.c	2015-05-19 15:08:43.000000000 -0400
***************
*** 5131,5139 ****
      case OR_OR:
      case '&':
      case DO:
      case THEN:
      case ELSE:
      case '{':		/* } */
!     case '(':		/* ) */
      case BANG:		/* ! time pipeline */
      case TIME:		/* time time pipeline */
--- 5131,5144 ----
      case OR_OR:
      case '&':
+     case WHILE:
      case DO:
+     case UNTIL:
+     case IF:
      case THEN:
+     case ELIF:
      case ELSE:
      case '{':		/* } */
!     case '(':		/* )( */
!     case ')':		/* only valid in case statement */
      case BANG:		/* ! time pipeline */
      case TIME:		/* time time pipeline */
*** a/bash-4.3/patchlevel.h	2012-12-29 10:47:57.000000000 -0500
--- b/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 37
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 38
  
  #endif /* _PATCHLEVEL_H_ */
Loading