equal
deleted
inserted
replaced
|
1 BASH PATCH REPORT |
|
2 ================= |
|
3 |
|
4 Bash-Release: 4.2 |
|
5 Patch-ID: bash42-024 |
|
6 |
|
7 Bug-Reported-by: Jim Avera <[email protected]> |
|
8 Bug-Reference-ID: <[email protected]> |
|
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 *** ../bash-4.2-patched/builtins/printf.def 2011-02-25 12:07:41.000000000 -0500 |
|
21 --- builtins/printf.def 2012-02-02 08:37:12.000000000 -0500 |
|
22 *************** |
|
23 *** 256,259 **** |
|
24 --- 257,262 ---- |
|
25 { |
|
26 vflag = 1; |
|
27 + if (vbsize == 0) |
|
28 + vbuf = xmalloc (vbsize = 16); |
|
29 vblen = 0; |
|
30 if (vbuf) |
|
31 *** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010 |
|
32 --- patchlevel.h Thu Feb 24 21:41:34 2011 |
|
33 *************** |
|
34 *** 26,30 **** |
|
35 looks for to find the patch level (for the sccs version string). */ |
|
36 |
|
37 ! #define PATCHLEVEL 23 |
|
38 |
|
39 #endif /* _PATCHLEVEL_H_ */ |
|
40 --- 26,30 ---- |
|
41 looks for to find the patch level (for the sccs version string). */ |
|
42 |
|
43 ! #define PATCHLEVEL 24 |
|
44 |
|
45 #endif /* _PATCHLEVEL_H_ */ |