chiark / gitweb /
Disable all exported shell functions
[bash.git] / debian / patches / bash42-022.diff
1                              BASH PATCH REPORT
2                              =================
3
4 Bash-Release:   4.2
5 Patch-ID:       bash42-022
6
7 Bug-Reported-by:        Gregory Margo <gmargo@pacbell.net>
8 Bug-Reference-ID:       <20110727174529.GA3333@pacbell.net>
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 Index: b/bash/lib/sh/zread.c
17 ===================================================================
18 --- a/bash/lib/sh/zread.c
19 +++ b/bash/lib/sh/zread.c
20 @@ -160,14 +160,13 @@
21  zsyncfd (fd)
22       int fd;
23  {
24 -  off_t off;
25 -  int r;
26 +  off_t off, r;
27  
28    off = lused - lind;
29    r = 0;
30    if (off > 0)
31      r = lseek (fd, -off, SEEK_CUR);
32  
33 -  if (r >= 0)
34 +  if (r != -1)
35      lused = lind = 0;
36  }
37 Index: b/bash/patchlevel.h
38 ===================================================================
39 --- a/bash/patchlevel.h
40 +++ b/bash/patchlevel.h
41 @@ -25,6 +25,6 @@
42     regexp `^#define[   ]*PATCHLEVEL', since that's what support/mkversion.sh
43     looks for to find the patch level (for the sccs version string). */
44  
45 -#define PATCHLEVEL 21
46 +#define PATCHLEVEL 22
47  
48  #endif /* _PATCHLEVEL_H_ */