svashisht / rpms / bash

Forked from rpms/bash 6 years ago
Clone
42f4b10
			     BASH PATCH REPORT
42f4b10
			     =================
42f4b10
42f4b10
Bash-Release:	4.3
42f4b10
Patch-ID:	bash43-043
42f4b10
42f4b10
Bug-Reported-by:	lolilolicon <lolilolicon@gmail.com>
42f4b10
Bug-Reference-ID:	<CAMtVo_MF16KWanCB4C8WxA88Qt26zWsvV6V7+_U2fM0E6tCDxw@mail.gmail.com>
42f4b10
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2014-08/msg00040.html
42f4b10
42f4b10
Bug-Description:
42f4b10
42f4b10
When the lastpipe option is enabled, the last component can contain nested
42f4b10
pipelines and cause a segmentation fault under certain circumestances.
42f4b10
42f4b10
Patch (apply with `patch -p0'):
42f4b10
42f4b10
*** ../bash-4.3-patched/execute_cmd.c	2014-07-30 10:26:52.000000000 -0400
42f4b10
--- execute_cmd.c	2014-08-15 08:55:24.000000000 -0400
42f4b10
***************
42f4b10
*** 2406,2412 ****
42f4b10
      {
42f4b10
  #if defined (JOB_CONTROL)
42f4b10
!       append_process (savestring (the_printed_command), dollar_dollar_pid, exec_result, lastpipe_jid);
42f4b10
! #endif
42f4b10
        lstdin = wait_for (lastpid);
42f4b10
  #if defined (JOB_CONTROL)
42f4b10
        /* If wait_for removes the job from the jobs table, use result of last
42f4b10
--- 2433,2447 ----
42f4b10
      {
42f4b10
  #if defined (JOB_CONTROL)
42f4b10
!       if (INVALID_JOB (lastpipe_jid) == 0)
42f4b10
!         {
42f4b10
!           append_process (savestring (the_printed_command_except_trap), dollar_dollar_pid, exec_result, lastpipe_jid);
42f4b10
!           lstdin = wait_for (lastpid);
42f4b10
!         }
42f4b10
!       else
42f4b10
!         lstdin = wait_for_single_pid (lastpid);		/* checks bgpids list */
42f4b10
! #else
42f4b10
        lstdin = wait_for (lastpid);
42f4b10
+ #endif
42f4b10
+ 
42f4b10
  #if defined (JOB_CONTROL)
42f4b10
        /* If wait_for removes the job from the jobs table, use result of last
42f4b10
*** ../bash-4.3/patchlevel.h	2012-12-29 10:47:57.000000000 -0500
42f4b10
--- patchlevel.h	2014-03-20 20:01:28.000000000 -0400
42f4b10
***************
42f4b10
*** 26,30 ****
42f4b10
     looks for to find the patch level (for the sccs version string). */
42f4b10
  
42f4b10
! #define PATCHLEVEL 42
42f4b10
  
42f4b10
  #endif /* _PATCHLEVEL_H_ */
42f4b10
--- 26,30 ----
42f4b10
     looks for to find the patch level (for the sccs version string). */
42f4b10
  
42f4b10
! #define PATCHLEVEL 43
42f4b10
  
42f4b10
  #endif /* _PATCHLEVEL_H_ */