bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bash-4.3 Official Patch 23


From: Chet Ramey
Subject: Bash-4.3 Official Patch 23
Date: Wed, 20 Aug 2014 08:47:38 -0400

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

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

Bug-Reported-by:        Tim Friske <address@hidden>
Bug-Reference-ID:       <address@hidden>
Bug-Reference-URL:      
http://lists.gnu.org/archive/html/bug-bash/2014-06/msg00056.html

Bug-Description:

Bash does not correctly parse process substitution constructs that contain
unbalanced parentheses as part of the contained command.

Patch (apply with `patch -p0'):

*** ../bash-4.3-patched/subst.h 2014-01-11 21:02:27.000000000 -0500
--- subst.h     2014-07-20 17:25:01.000000000 -0400
***************
*** 83,87 ****
     Start extracting at (SINDEX) as if we had just seen "<(".
     Make (SINDEX) get the position just after the matching ")". */
! extern char *extract_process_subst __P((char *, char *, int *));
  #endif /* PROCESS_SUBSTITUTION */
  
--- 83,87 ----
     Start extracting at (SINDEX) as if we had just seen "<(".
     Make (SINDEX) get the position just after the matching ")". */
! extern char *extract_process_subst __P((char *, char *, int *, int));
  #endif /* PROCESS_SUBSTITUTION */
  
*** ../bash-4.3-patched/subst.c 2014-05-15 08:26:45.000000000 -0400
--- subst.c     2014-07-20 17:26:44.000000000 -0400
***************
*** 1193,1202 ****
     Make (SINDEX) get the position of the matching ")". */ /*))*/
  char *
! extract_process_subst (string, starter, sindex)
       char *string;
       char *starter;
       int *sindex;
  {
    return (extract_delimited_string (string, sindex, starter, "(", ")", 
SX_COMMAND));
  }
  #endif /* PROCESS_SUBSTITUTION */
--- 1193,1208 ----
     Make (SINDEX) get the position of the matching ")". */ /*))*/
  char *
! extract_process_subst (string, starter, sindex, xflags)
       char *string;
       char *starter;
       int *sindex;
+      int xflags;
  {
+ #if 0
    return (extract_delimited_string (string, sindex, starter, "(", ")", 
SX_COMMAND));
+ #else
+   xflags |= (no_longjmp_on_fatal_error ? SX_NOLONGJMP : 0);
+   return (xparse_dolparen (string, string+*sindex, sindex, xflags));
+ #endif
  }
  #endif /* PROCESS_SUBSTITUTION */
***************
*** 1786,1790 ****
          if (string[si] == '\0')
            CQ_RETURN(si);
!         temp = extract_process_subst (string, (c == '<') ? "<(" : ">(", &si);
          free (temp);          /* no SX_ALLOC here */
          i = si;
--- 1792,1796 ----
          if (string[si] == '\0')
            CQ_RETURN(si);
!         temp = extract_process_subst (string, (c == '<') ? "<(" : ">(", &si, 
0);
          free (temp);          /* no SX_ALLOC here */
          i = si;
***************
*** 8250,8254 ****
              t_index = sindex + 1; /* skip past both '<' and LPAREN */
  
!           temp1 = extract_process_subst (string, (c == '<') ? "<(" : ">(", 
&t_index); /*))*/
            sindex = t_index;
  
--- 8256,8260 ----
              t_index = sindex + 1; /* skip past both '<' and LPAREN */
  
!           temp1 = extract_process_subst (string, (c == '<') ? "<(" : ">(", 
&t_index, 0); /*))*/
            sindex = t_index;
  
*** ../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 22
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 23
  
  #endif /* _PATCHLEVEL_H_ */

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]