[bash] Patchlevel 36

Roman Rakus rrakus at fedoraproject.org
Tue Jul 10 20:30:34 UTC 2012


commit 6c00439e19ba9ae520b0a0133b06f5b0e18f4748
Author: Roman Rakus <rrakus at redhat.com>
Date:   Tue Jul 10 22:29:10 2012 +0200

    Patchlevel 36
    
    Signed-off-by: Roman Rakus <rrakus at redhat.com>

 bash.spec  |   21 +++++++-
 bash42-030 |  178 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 bash42-031 |   80 +++++++++++++++++++++++++++
 bash42-032 |   75 +++++++++++++++++++++++++
 bash42-033 |   57 +++++++++++++++++++
 bash42-034 |   46 ++++++++++++++++
 bash42-035 |   66 ++++++++++++++++++++++
 bash42-036 |   92 +++++++++++++++++++++++++++++++
 8 files changed, 613 insertions(+), 2 deletions(-)
---
diff --git a/bash.spec b/bash.spec
index bd2c728..c030271 100644
--- a/bash.spec
+++ b/bash.spec
@@ -1,12 +1,12 @@
 #% define beta_tag rc2
-%define patchleveltag .29
+%define patchleveltag .36
 %define baseversion 4.2
 %bcond_without tests
 
 Version: %{baseversion}%{patchleveltag}
 Name: bash
 Summary: The GNU Bourne Again shell
-Release: 3%{?dist}
+Release: 1%{?dist}
 Group: System Environment/Shells
 License: GPLv3+
 Url: http://www.gnu.org/software/bash
@@ -49,6 +49,13 @@ Patch026: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-026
 Patch027: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-027
 Patch028: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-028
 Patch029: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-029
+Patch030: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-030
+Patch031: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-031
+Patch032: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-032
+Patch033: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-033
+Patch034: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-034
+Patch035: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-035
+Patch036: ftp://ftp.gnu.org/pub/gnu/bash/bash-4.2-patches/bash42-036
 
 # Other patches
 Patch101: bash-2.02-security.patch
@@ -144,6 +151,13 @@ This package contains documentation files for %{name}.
 %patch027 -p0 -b .027
 %patch028 -p0 -b .028
 %patch029 -p0 -b .029
+%patch030 -p0 -b .030
+%patch031 -p0 -b .031
+%patch032 -p0 -b .032
+%patch033 -p0 -b .033
+%patch034 -p0 -b .034
+%patch035 -p0 -b .035
+%patch036 -p0 -b .036
 
 # Other patches
 %patch101 -p1 -b .security
@@ -358,6 +372,9 @@ end
 #%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt
 
 %changelog
+* Tue Jul 10 2012 Roman Rakus <rrakus at redhat.com> - 4.2.36-1
+- Patchlevel 36
+
 * Sat Jun 23 2012 Roman Rakus <rrakus at redhat.com> - 4.2.29-3
 - Remove /bin from DEFAULT_PATH_VALUE
   Resolves: #834571
diff --git a/bash42-030 b/bash42-030
new file mode 100644
index 0000000..261a619
--- /dev/null
+++ b/bash42-030
@@ -0,0 +1,178 @@
+			     BASH PATCH REPORT
+			     =================
+
+Bash-Release:	4.2
+Patch-ID:	bash42-030
+
+Bug-Reported-by:	Roman Rakus <rrakus at redhat.com>
+Bug-Reference-ID:	<4D7DD91E.7040808 at redhat.com>
+Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2011-03/msg00126.html
+
+Bug-Description:
+
+When attempting to glob strings in a multibyte locale, and those strings
+contain invalid multibyte characters that cause mbsnrtowcs to return 0,
+the globbing code loops infinitely.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/lib/glob/xmbsrtowcs.c	2010-05-30 18:36:27.000000000 -0400
+--- lib/glob/xmbsrtowcs.c	2011-03-22 16:06:47.000000000 -0400
+***************
+*** 36,39 ****
+--- 36,41 ----
+  #if HANDLE_MULTIBYTE
+  
++ #define WSBUF_INC 32
++ 
+  #ifndef FREE
+  #  define FREE(x)	do { if (x) free (x); } while (0)
+***************
+*** 149,153 ****
+    size_t wcnum;		/* Number of wide characters in WSBUF */
+    mbstate_t state;	/* Conversion State */
+!   size_t wcslength;	/* Number of wide characters produced by the conversion. */
+    const char *end_or_backslash;
+    size_t nms;	/* Number of multibyte characters to convert at one time. */
+--- 151,155 ----
+    size_t wcnum;		/* Number of wide characters in WSBUF */
+    mbstate_t state;	/* Conversion State */
+!   size_t n, wcslength;	/* Number of wide characters produced by the conversion. */
+    const char *end_or_backslash;
+    size_t nms;	/* Number of multibyte characters to convert at one time. */
+***************
+*** 172,176 ****
+        tmp_p = p;
+        tmp_state = state;
+!       wcslength = mbsnrtowcs(NULL, &tmp_p, nms, 0, &tmp_state);
+  
+        /* Conversion failed. */
+--- 174,189 ----
+        tmp_p = p;
+        tmp_state = state;
+! 
+!       if (nms == 0 && *p == '\\')	/* special initial case */
+! 	nms = wcslength = 1;
+!       else
+! 	wcslength = mbsnrtowcs (NULL, &tmp_p, nms, 0, &tmp_state);
+! 
+!       if (wcslength == 0)
+! 	{
+! 	  tmp_p = p;		/* will need below */
+! 	  tmp_state = state;
+! 	  wcslength = 1;	/* take a single byte */
+! 	}
+  
+        /* Conversion failed. */
+***************
+*** 187,191 ****
+  	  wchar_t *wstmp;
+  
+! 	  wsbuf_size = wcnum+wcslength+1;	/* 1 for the L'\0' or the potential L'\\' */
+  
+  	  wstmp = (wchar_t *) realloc (wsbuf, wsbuf_size * sizeof (wchar_t));
+--- 200,205 ----
+  	  wchar_t *wstmp;
+  
+! 	  while (wsbuf_size < wcnum+wcslength+1) /* 1 for the L'\0' or the potential L'\\' */
+! 	    wsbuf_size += WSBUF_INC;
+  
+  	  wstmp = (wchar_t *) realloc (wsbuf, wsbuf_size * sizeof (wchar_t));
+***************
+*** 200,207 ****
+  
+        /* Perform the conversion. This is assumed to return 'wcslength'.
+!        * It may set 'p' to NULL. */
+!       mbsnrtowcs(wsbuf+wcnum, &p, nms, wsbuf_size-wcnum, &state);
+  
+!       wcnum += wcslength;
+  
+        if (mbsinit (&state) && (p != NULL) && (*p == '\\'))
+--- 214,229 ----
+  
+        /* Perform the conversion. This is assumed to return 'wcslength'.
+! 	 It may set 'p' to NULL. */
+!       n = mbsnrtowcs(wsbuf+wcnum, &p, nms, wsbuf_size-wcnum, &state);
+  
+!       /* Compensate for taking single byte on wcs conversion failure above. */
+!       if (wcslength == 1 && (n == 0 || n == (size_t)-1))
+! 	{
+! 	  state = tmp_state;
+! 	  p = tmp_p;
+! 	  wsbuf[wcnum++] = *p++;
+! 	}
+!       else
+!         wcnum += wcslength;
+  
+        if (mbsinit (&state) && (p != NULL) && (*p == '\\'))
+***************
+*** 231,236 ****
+     of DESTP and INDICESP are NULL. */
+  
+- #define WSBUF_INC 32
+- 
+  size_t
+  xdupmbstowcs (destp, indicesp, src)
+--- 253,256 ----
+*** ../bash-4.2-patched/lib/glob/glob.c	2009-11-14 18:39:30.000000000 -0500
+--- lib/glob/glob.c	2012-07-07 12:09:56.000000000 -0400
+***************
+*** 201,206 ****
+    size_t pat_n, dn_n;
+  
+    pat_n = xdupmbstowcs (&pat_wc, NULL, pat);
+!   dn_n = xdupmbstowcs (&dn_wc, NULL, dname);
+  
+    ret = 0;
+--- 201,209 ----
+    size_t pat_n, dn_n;
+  
++   pat_wc = dn_wc = (wchar_t *)NULL;
++ 
+    pat_n = xdupmbstowcs (&pat_wc, NULL, pat);
+!   if (pat_n != (size_t)-1)
+!     dn_n = xdupmbstowcs (&dn_wc, NULL, dname);
+  
+    ret = 0;
+***************
+*** 222,225 ****
+--- 225,230 ----
+  	ret = 1;
+      }
++   else
++     ret = skipname (pat, dname, flags);
+  
+    FREE (pat_wc);
+***************
+*** 267,272 ****
+    n = xdupmbstowcs (&wpathname, NULL, pathname);
+    if (n == (size_t) -1)
+!     /* Something wrong. */
+!     return;
+    orig_wpathname = wpathname;
+  
+--- 272,280 ----
+    n = xdupmbstowcs (&wpathname, NULL, pathname);
+    if (n == (size_t) -1)
+!     {
+!       /* Something wrong.  Fall back to single-byte */
+!       udequote_pathname (pathname);
+!       return;
+!     }
+    orig_wpathname = wpathname;
+  
+*** ../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 29
+  
+  #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 30
+  
+  #endif /* _PATCHLEVEL_H_ */
diff --git a/bash42-031 b/bash42-031
new file mode 100644
index 0000000..419d447
--- /dev/null
+++ b/bash42-031
@@ -0,0 +1,80 @@
+			     BASH PATCH REPORT
+			     =================
+
+Bash-Release:	4.2
+Patch-ID:	bash42-031
+
+Bug-Reported-by:	Max Horn <max at quendi.de>
+Bug-Reference-ID:	<20CC5C60-07C3-4E41-9817-741E48D407C5 at quendi.de>
+Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-readline/2012-06/msg00005.html
+
+Bug-Description:
+
+A change between bash-4.1 and bash-4.2 to prevent the readline input hook
+from being called too frequently had the side effect of causing delays
+when reading pasted input on systems such as Mac OS X.  This patch fixes
+those delays while retaining the bash-4.2 behavior.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/lib/readline/input.c	2010-05-30 18:33:01.000000000 -0400
+--- lib/readline/input.c	2012-06-25 21:08:42.000000000 -0400
+***************
+*** 410,414 ****
+  rl_read_key ()
+  {
+!   int c;
+  
+    rl_key_sequence_length++;
+--- 412,416 ----
+  rl_read_key ()
+  {
+!   int c, r;
+  
+    rl_key_sequence_length++;
+***************
+*** 430,441 ****
+  	  while (rl_event_hook)
+  	    {
+! 	      if (rl_gather_tyi () < 0)	/* XXX - EIO */
+  		{
+  		  rl_done = 1;
+  		  return ('\n');
+  		}
+  	      RL_CHECK_SIGNALS ();
+- 	      if (rl_get_char (&c) != 0)
+- 		break;
+  	      if (rl_done)		/* XXX - experimental */
+  		return ('\n');
+--- 432,447 ----
+  	  while (rl_event_hook)
+  	    {
+! 	      if (rl_get_char (&c) != 0)
+! 		break;
+! 		
+! 	      if ((r = rl_gather_tyi ()) < 0)	/* XXX - EIO */
+  		{
+  		  rl_done = 1;
+  		  return ('\n');
+  		}
++ 	      else if (r == 1)			/* read something */
++ 		continue;
++ 
+  	      RL_CHECK_SIGNALS ();
+  	      if (rl_done)		/* XXX - experimental */
+  		return ('\n');
+*** ../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 30
+  
+  #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 31
+  
+  #endif /* _PATCHLEVEL_H_ */
diff --git a/bash42-032 b/bash42-032
new file mode 100644
index 0000000..d4f25ca
--- /dev/null
+++ b/bash42-032
@@ -0,0 +1,75 @@
+			     BASH PATCH REPORT
+			     =================
+
+Bash-Release:	4.2
+Patch-ID:	bash42-032
+
+Bug-Reported-by:	Ruediger Kuhlmann <RKuhlmann at orga-systems.com>
+Bug-Reference-ID:	<OFDE975207.0C3622E5-ONC12579F3.00361A06-C12579F3.00365E39 at orga-systems.com>
+Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2012-05/msg00010.html
+
+Bug-Description:
+
+Bash-4.2 has problems with DEL characters in the expanded value of variables
+used in the same quoted string as variables that expand to nothing.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-20120427/subst.c	2012-04-22 16:19:10.000000000 -0400
+--- subst.c	2012-05-07 16:06:35.000000000 -0400
+***************
+*** 8152,8155 ****
+--- 8152,8163 ----
+  	  dispose_word_desc (tword);
+  
++ 	  /* Kill quoted nulls; we will add them back at the end of
++ 	     expand_word_internal if nothing else in the string */
++ 	  if (had_quoted_null && temp && QUOTED_NULL (temp))
++ 	    {
++ 	      FREE (temp);
++ 	      temp = (char *)NULL;
++ 	    }
++ 
+  	  goto add_string;
+  	  break;
+***************
+*** 8556,8560 ****
+        if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+  	tword->flags |= W_QUOTED;
+!       if (had_quoted_null)
+  	tword->flags |= W_HASQUOTEDNULL;
+        list = make_word_list (tword, (WORD_LIST *)NULL);
+--- 8564,8568 ----
+        if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+  	tword->flags |= W_QUOTED;
+!       if (had_quoted_null && QUOTED_NULL (istring))
+  	tword->flags |= W_HASQUOTEDNULL;
+        list = make_word_list (tword, (WORD_LIST *)NULL);
+***************
+*** 8587,8591 ****
+  	  if (word->flags & W_NOEXPAND)
+  	    tword->flags |= W_NOEXPAND;
+! 	  if (had_quoted_null)
+  	    tword->flags |= W_HASQUOTEDNULL;	/* XXX */
+  	  list = make_word_list (tword, (WORD_LIST *)NULL);
+--- 8595,8599 ----
+  	  if (word->flags & W_NOEXPAND)
+  	    tword->flags |= W_NOEXPAND;
+! 	  if (had_quoted_null && QUOTED_NULL (istring))
+  	    tword->flags |= W_HASQUOTEDNULL;	/* XXX */
+  	  list = make_word_list (tword, (WORD_LIST *)NULL);
+*** ../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 31
+  
+  #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 32
+  
+  #endif /* _PATCHLEVEL_H_ */
diff --git a/bash42-033 b/bash42-033
new file mode 100644
index 0000000..e58d728
--- /dev/null
+++ b/bash42-033
@@ -0,0 +1,57 @@
+			     BASH PATCH REPORT
+			     =================
+
+Bash-Release:	4.2
+Patch-ID:	bash42-033
+
+Bug-Reported-by:	David Leverton <levertond at googlemail.com>
+Bug-Reference-ID:	<4FCCE737.1060603 at googlemail.com>
+Bug-Reference-URL:
+
+Bug-Description:
+
+Bash uses a static buffer when expanding the /dev/fd prefix for the test
+and conditional commands, among other uses, when it should use a dynamic
+buffer to avoid buffer overflow.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/lib/sh/eaccess.c	2011-01-08 20:50:10.000000000 -0500
+--- lib/sh/eaccess.c	2012-06-04 21:06:43.000000000 -0400
+***************
+*** 83,86 ****
+--- 83,88 ----
+       struct stat *finfo;
+  {
++   static char *pbuf = 0;
++ 
+    if (*path == '\0')
+      {
+***************
+*** 107,111 ****
+       On most systems, with the notable exception of linux, this is
+       effectively a no-op. */
+!       char pbuf[32];
+        strcpy (pbuf, DEV_FD_PREFIX);
+        strcat (pbuf, path + 8);
+--- 109,113 ----
+       On most systems, with the notable exception of linux, this is
+       effectively a no-op. */
+!       pbuf = xrealloc (pbuf, sizeof (DEV_FD_PREFIX) + strlen (path + 8));
+        strcpy (pbuf, DEV_FD_PREFIX);
+        strcat (pbuf, path + 8);
+*** ../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 32
+  
+  #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 33
+  
+  #endif /* _PATCHLEVEL_H_ */
diff --git a/bash42-034 b/bash42-034
new file mode 100644
index 0000000..e4f05e1
--- /dev/null
+++ b/bash42-034
@@ -0,0 +1,46 @@
+			     BASH PATCH REPORT
+			     =================
+
+Bash-Release:	4.2
+Patch-ID:	bash42-034
+
+Bug-Reported-by:	"Davide Brini" <dave_br at gmx.com>
+Bug-Reference-ID:	<20120604164154.69781EC04B at imaps.oficinas.atrapalo.com>
+Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2012-06/msg00030.html
+
+Bug-Description:
+
+In bash-4.2, the history code would inappropriately add a semicolon to
+multi-line compound array assignments when adding them to the history.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/parse.y	2011-11-21 18:03:36.000000000 -0500
+--- parse.y	2012-06-07 12:48:47.000000000 -0400
+***************
+*** 4900,4905 ****
+--- 4916,4924 ----
+        return (current_command_line_count == 2 ? "\n" : "");
+      }
+  
++   if (parser_state & PST_COMPASSIGN)
++     return (" ");
++ 
+    /* First, handle some special cases. */
+    /*(*/
+    /* If we just read `()', assume it's a function definition, and don't
+*** ../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 33
+  
+  #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 34
+  
+  #endif /* _PATCHLEVEL_H_ */
diff --git a/bash42-035 b/bash42-035
new file mode 100644
index 0000000..6f0be6f
--- /dev/null
+++ b/bash42-035
@@ -0,0 +1,66 @@
+			     BASH PATCH REPORT
+			     =================
+
+Bash-Release:	4.2
+Patch-ID:	bash42-035
+
+Bug-Reported-by:	Dan Douglas <ormaaj at gmail.com>
+Bug-Reference-ID:	<2766482.Ksm3GrSoYi at smorgbox>
+Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2012-06/msg00071.html
+
+Bug-Description:
+
+When given a number of lines to read, `mapfile -n lines' reads one too many.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/builtins/mapfile.def	2010-05-29 22:09:47.000000000 -0400
+--- builtins/mapfile.def	2012-06-20 09:48:33.000000000 -0400
+***************
+*** 196,206 ****
+    interrupt_immediately++;
+    for (array_index = origin, line_count = 1; 
+!        zgetline (fd, &line, &line_length, unbuffered_read) != -1;
+!        array_index++, line_count++) 
+      {
+-       /* Have we exceeded # of lines to store? */
+-       if (line_count_goal != 0 && line_count > line_count_goal) 
+- 	break;
+- 
+        /* Remove trailing newlines? */
+        if (flags & MAPF_CHOP)
+--- 196,202 ----
+    interrupt_immediately++;
+    for (array_index = origin, line_count = 1; 
+!  	zgetline (fd, &line, &line_length, unbuffered_read) != -1;
+! 	array_index++) 
+      {
+        /* Remove trailing newlines? */
+        if (flags & MAPF_CHOP)
+***************
+*** 218,221 ****
+--- 214,222 ----
+  
+        bind_array_element (entry, array_index, line, 0);
++ 
++       /* Have we exceeded # of lines to store? */
++       line_count++;
++       if (line_count_goal != 0 && line_count > line_count_goal) 
++ 	break;
+      }
+  
+*** ../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 34
+  
+  #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 35
+  
+  #endif /* _PATCHLEVEL_H_ */
diff --git a/bash42-036 b/bash42-036
new file mode 100644
index 0000000..73fac40
--- /dev/null
+++ b/bash42-036
@@ -0,0 +1,92 @@
+			     BASH PATCH REPORT
+			     =================
+
+Bash-Release:	4.2
+Patch-ID:	bash42-036
+
+Bug-Reported-by:	gregrwm <backuppc-users at whitleymott.net>
+Bug-Reference-ID:	<CAD+dB9B4JG+qUwZBQUwiQmVt0j6NDn=DDTxr9R+nkA8DL4KLJA at mail.gmail.com>
+Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2012-05/msg00108.html
+
+Bug-Description:
+
+Bash-4.2 produces incorrect word splitting results when expanding
+double-quoted $@ in the same string as and adjacent to other variable
+expansions.  The $@ should be split, the other expansions should not.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/subst.c	2012-05-02 12:02:33.000000000 -0400
+--- subst.c	2012-07-08 21:19:32.000000000 -0400
+***************
+*** 7923,7927 ****
+    /* State flags */
+    int had_quoted_null;
+!   int has_dollar_at;
+    int tflag;
+    int pflags;			/* flags passed to param_expand */
+--- 7923,7927 ----
+    /* State flags */
+    int had_quoted_null;
+!   int has_dollar_at, temp_has_dollar_at;
+    int tflag;
+    int pflags;			/* flags passed to param_expand */
+***************
+*** 8128,8138 ****
+  	    *expanded_something = 1;
+  
+! 	  has_dollar_at = 0;
+  	  pflags = (word->flags & W_NOCOMSUB) ? PF_NOCOMSUB : 0;
+  	  if (word->flags & W_NOSPLIT2)
+  	    pflags |= PF_NOSPLIT2;
+  	  tword = param_expand (string, &sindex, quoted, expanded_something,
+! 			       &has_dollar_at, &quoted_dollar_at,
+  			       &had_quoted_null, pflags);
+  
+  	  if (tword == &expand_wdesc_error || tword == &expand_wdesc_fatal)
+--- 8128,8139 ----
+  	    *expanded_something = 1;
+  
+! 	  temp_has_dollar_at = 0;
+  	  pflags = (word->flags & W_NOCOMSUB) ? PF_NOCOMSUB : 0;
+  	  if (word->flags & W_NOSPLIT2)
+  	    pflags |= PF_NOSPLIT2;
+  	  tword = param_expand (string, &sindex, quoted, expanded_something,
+! 			       &temp_has_dollar_at, &quoted_dollar_at,
+  			       &had_quoted_null, pflags);
++ 	  has_dollar_at += temp_has_dollar_at;
+  
+  	  if (tword == &expand_wdesc_error || tword == &expand_wdesc_fatal)
+***************
+*** 8275,8281 ****
+  	      temp = (char *)NULL;
+  
+! 	      has_dollar_at = 0;
+  	      /* Need to get W_HASQUOTEDNULL flag through this function. */
+! 	      list = expand_word_internal (tword, Q_DOUBLE_QUOTES, 0, &has_dollar_at, (int *)NULL);
+  
+  	      if (list == &expand_word_error || list == &expand_word_fatal)
+--- 8276,8283 ----
+  	      temp = (char *)NULL;
+  
+! 	      temp_has_dollar_at = 0;	/* XXX */
+  	      /* Need to get W_HASQUOTEDNULL flag through this function. */
+! 	      list = expand_word_internal (tword, Q_DOUBLE_QUOTES, 0, &temp_has_dollar_at, (int *)NULL);
+! 	      has_dollar_at += temp_has_dollar_at;
+  
+  	      if (list == &expand_word_error || list == &expand_word_fatal)
+*** ../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 35
+  
+  #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+     looks for to find the patch level (for the sccs version string). */
+  
+! #define PATCHLEVEL 36
+  
+  #endif /* _PATCHLEVEL_H_ */


More information about the scm-commits mailing list