ntfsprogs: obsoleted
[packages.git] / utils / bash / patches / 124-upstream-bash42-024.patch
1                              BASH PATCH REPORT
2                              =================
3
4 Bash-Release:   4.2
5 Patch-ID:       bash42-024
6
7 Bug-Reported-by:        Jim Avera <james_avera@yahoo.com>
8 Bug-Reference-ID:       <4F29E07A.80405@yahoo.com>
9 Bug-Reference-URL:      http://lists.gnu.org/archive/html/bug-bash/2012-02/msg00001.html
10
11 Bug-Description:
12
13 When `printf -v' is used to set an array element, the format string contains
14 `%b', and the corresponding argument is the empty string, the buffer used
15 to store the value to be assigned can be NULL, which results in NUL being
16 assigned to the array element.  This causes a seg fault when it's used later.
17
18 Patch (apply with `patch -p0'):
19
20 --- a/builtins/printf.def
21 +++ b/builtins/printf.def
22 @@ -255,6 +255,8 @@ printf_builtin (list)
23  #endif
24             {
25               vflag = 1;
26 +             if (vbsize == 0)
27 +               vbuf = xmalloc (vbsize = 16);
28               vblen = 0;
29               if (vbuf)
30                 vbuf[0] = 0;
31 --- a/patchlevel.h
32 +++ b/patchlevel.h
33 @@ -25,6 +25,6 @@
34     regexp `^#define[   ]*PATCHLEVEL', since that's what support/mkversion.sh
35     looks for to find the patch level (for the sccs version string). */
36  
37 -#define PATCHLEVEL 23
38 +#define PATCHLEVEL 24
39  
40  #endif /* _PATCHLEVEL_H_ */