usr/src/cmd/bash/Patches-4.0/bash40-033
author Jon Tibble <meths@btinternet.com>
Mon, 04 May 2015 14:04:39 +0100
branchoi_151a
changeset 254 9c2a4ac793f0
permissions -rw-r--r--
Bash patch catchup including shellshock

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

Bash-Release: 4.0
Patch-ID: bash40-033

Bug-Reported-by:	Dr. Werner Fink <[email protected]>
Bug-Reference-ID:	<[email protected]>
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2009-07/msg00000.html

Bug-Description:

Bash-4.0 has a memory leak in the `read' builtin when the number of fields
read is not the same as the number of variables passed as arguments.

Patch:

*** ../bash-4.0-patched/builtins/read.def	2009-03-08 21:24:45.000000000 -0400
--- builtins/read.def	2009-07-01 15:32:42.000000000 -0400
***************
*** 764,768 ****
  	tofree = input_string = t;
        else
! 	input_string = strip_trailing_ifs_whitespace (t1, ifs_chars, saw_escape);
      }
  #endif
--- 764,771 ----
  	tofree = input_string = t;
        else
! 	{
! 	  input_string = strip_trailing_ifs_whitespace (t1, ifs_chars, saw_escape);
! 	  tofree = t;
! 	}
      }
  #endif
*** ../bash-4.0/patchlevel.h	2009-01-04 14:32:40.000000000 -0500
--- patchlevel.h	2009-02-22 16:11:31.000000000 -0500
***************
*** 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_ */