components/bash/patches/bash42-022.patch
changeset 5518 c47fe0edc204
parent 5517 7758049098f4
child 5519 a02d4d12218f
equal deleted inserted replaced
5517:7758049098f4 5518:c47fe0edc204
     1 			     BASH PATCH REPORT
       
     2 			     =================
       
     3 
       
     4 Bash-Release:	4.2
       
     5 Patch-ID:	bash42-022
       
     6 
       
     7 Bug-Reported-by:	Gregory Margo <[email protected]>
       
     8 Bug-Reference-ID:	<[email protected]>
       
     9 Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2011-07/msg00102.html
       
    10 
       
    11 Bug-Description:
       
    12 
       
    13 The return value from lseek is `off_t'.  This can cause corrupted return
       
    14 values when the file offset is greater than 2**31 - 1.
       
    15 
       
    16 Patch (apply with `patch -p0'):
       
    17 
       
    18 *** ../bash-4.2-patched/lib/sh/zread.c	Mon Mar  2 08:54:45 2009
       
    19 --- lib/sh/zread.c	Thu Jul 28 18:16:53 2011
       
    20 ***************
       
    21 *** 161,166 ****
       
    22        int fd;
       
    23   {
       
    24 !   off_t off;
       
    25 !   int r;
       
    26   
       
    27     off = lused - lind;
       
    28 --- 161,165 ----
       
    29        int fd;
       
    30   {
       
    31 !   off_t off, r;
       
    32   
       
    33     off = lused - lind;
       
    34 ***************
       
    35 *** 169,173 ****
       
    36       r = lseek (fd, -off, SEEK_CUR);
       
    37   
       
    38 !   if (r >= 0)
       
    39       lused = lind = 0;
       
    40   }
       
    41 --- 168,172 ----
       
    42       r = lseek (fd, -off, SEEK_CUR);
       
    43   
       
    44 !   if (r != -1)
       
    45       lused = lind = 0;
       
    46   }
       
    47 *** ../bash-4.2-patched/patchlevel.h	Sat Jun 12 20:14:48 2010
       
    48 --- patchlevel.h	Thu Feb 24 21:41:34 2011
       
    49 ***************
       
    50 *** 26,30 ****
       
    51      looks for to find the patch level (for the sccs version string). */
       
    52   
       
    53 ! #define PATCHLEVEL 21
       
    54   
       
    55   #endif /* _PATCHLEVEL_H_ */
       
    56 --- 26,30 ----
       
    57      looks for to find the patch level (for the sccs version string). */
       
    58   
       
    59 ! #define PATCHLEVEL 22
       
    60   
       
    61   #endif /* _PATCHLEVEL_H_ */