components/bash/patches/bash42-043.patch
author Stefan Teleman <stefan.teleman@oracle.com>
Fri, 19 Apr 2013 10:32:55 -0700
changeset 1275 03b86a2f9021
permissions -rw-r--r--
16522397 bash in S12 should be 64-bit 16522422 flex in S12 should be 64-bit 16531734 subversion in S12 should be 64-bit 16522480 bash flex and subversion should have ASLR enabled
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1275
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     1
			     BASH PATCH REPORT
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     2
			     =================
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     3
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     4
Bash-Release:	4.2
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     5
Patch-ID:	bash42-043
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     6
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     7
Bug-Reported-by:	konsolebox <[email protected]>
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     8
Bug-Reference-ID:	<CAJnmqwZuGKLgMsMwxRK4LL+2NN+HgvmKzrnode99QBGrcgX1Lw@mail.gmail.com>
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     9
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2013-01/msg00138.html
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    10
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    11
Bug-Description:
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    12
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    13
When SIGCHLD is trapped, and a SIGCHLD trap handler runs when a pending
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    14
`read -t' invocation times out and generates SIGALRM, bash can crash with
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    15
a segmentation fault.
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    16
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    17
Patch (apply with `patch -p0'):
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    18
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    19
*** ../bash-4.2-patched/builtins/read.def	2012-10-31 21:22:51.000517000 -0400
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    20
--- builtins/read.def	2013-01-25 10:28:16.000038000 -0500
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    21
***************
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    22
*** 386,393 ****
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    23
  	  /* Tricky.  The top of the unwind-protect stack is the free of
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    24
  	     input_string.  We want to run all the rest and use input_string,
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    25
! 	     so we have to remove it from the stack. */
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    26
! 	  remove_unwind_protect ();
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    27
! 	  run_unwind_frame ("read_builtin");
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    28
  	  input_string[i] = '\0';	/* make sure it's terminated */
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    29
  	  retval = 128+SIGALRM;
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    30
  	  goto assign_vars;
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    31
--- 386,403 ----
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    32
  	  /* Tricky.  The top of the unwind-protect stack is the free of
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    33
  	     input_string.  We want to run all the rest and use input_string,
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    34
! 	     so we have to save input_string temporarily, run the unwind-
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    35
! 	     protects, then restore input_string so we can use it later. */
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    36
! 
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    37
  	  input_string[i] = '\0';	/* make sure it's terminated */
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    38
+ 	  if (i == 0)
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    39
+ 	    {
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    40
+ 	      t = (char *)xmalloc (1);
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    41
+ 	      t[0] = 0;
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    42
+ 	    }
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    43
+ 	  else
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    44
+ 	    t = savestring (input_string);
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    45
+ 
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    46
+ 	  run_unwind_frame ("read_builtin");
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    47
+ 	  input_string = t;
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    48
  	  retval = 128+SIGALRM;
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    49
  	  goto assign_vars;
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    50
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    51
*** ../bash-4.2-patched/patchlevel.h	Sat Jun 12 20:14:48 2010
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    52
--- patchlevel.h	Thu Feb 24 21:41:34 2011
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    53
***************
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    54
*** 26,30 ****
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    55
     looks for to find the patch level (for the sccs version string). */
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    56
  
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    57
! #define PATCHLEVEL 42
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    58
  
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    59
  #endif /* _PATCHLEVEL_H_ */
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    60
--- 26,30 ----
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    61
     looks for to find the patch level (for the sccs version string). */
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    62
  
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    63
! #define PATCHLEVEL 43
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    64
  
03b86a2f9021 16522397 bash in S12 should be 64-bit
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    65
  #endif /* _PATCHLEVEL_H_ */