1 BASH PATCH REPORT |
|
2 ================= |
|
3 |
|
4 Bash-Release: 4.1 |
|
5 Patch-ID: bash41-010 |
|
6 |
|
7 Bug-Reported-by: Stephane Jourdois <[email protected]> |
|
8 Bug-Reference-ID: <[email protected]> |
|
9 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2010-05/msg00165.html |
|
10 |
|
11 Bug-Description: |
|
12 |
|
13 The expansion of the \W prompt string escape sequence incorrectly used |
|
14 strcpy to copy overlapping strings. Only memmove works in this case. |
|
15 |
|
16 Patch (apply with `patch -p0'): |
|
17 |
|
18 *** ../bash-4.1-patched/parse.y 2009-12-30 12:51:42.000000000 -0500 |
|
19 --- parse.y 2011-02-24 16:40:48.000000000 -0500 |
|
20 *************** |
|
21 *** 5153,5157 **** |
|
22 t = strrchr (t_string, '/'); |
|
23 if (t) |
|
24 ! strcpy (t_string, t + 1); |
|
25 } |
|
26 } |
|
27 --- 5153,5157 ---- |
|
28 t = strrchr (t_string, '/'); |
|
29 if (t) |
|
30 ! memmove (t_string, t + 1, strlen (t)); |
|
31 } |
|
32 } |
|
33 *** ../bash-4.1-patched/y.tab.c 2009-12-30 12:52:02.000000000 -0500 |
|
34 --- y.tab.c 2011-02-24 16:50:27.000000000 -0500 |
|
35 *************** |
|
36 *** 7482,7486 **** |
|
37 t = strrchr (t_string, '/'); |
|
38 if (t) |
|
39 ! strcpy (t_string, t + 1); |
|
40 } |
|
41 } |
|
42 --- 7482,7486 ---- |
|
43 t = strrchr (t_string, '/'); |
|
44 if (t) |
|
45 ! memmove (t_string, t + 1, strlen (t)); |
|
46 } |
|
47 } |
|
48 *************** |
|
49 *** 8244,8246 **** |
|
50 } |
|
51 #endif /* HANDLE_MULTIBYTE */ |
|
52 - |
|
53 --- 8244,8245 ---- |
|
54 *** ../bash-4.1-patched/patchlevel.h 2009-10-01 16:39:22.000000000 -0400 |
|
55 --- patchlevel.h 2010-01-14 09:38:08.000000000 -0500 |
|
56 *************** |
|
57 *** 26,30 **** |
|
58 looks for to find the patch level (for the sccs version string). */ |
|
59 |
|
60 ! #define PATCHLEVEL 9 |
|
61 |
|
62 #endif /* _PATCHLEVEL_H_ */ |
|
63 --- 26,30 ---- |
|
64 looks for to find the patch level (for the sccs version string). */ |
|
65 |
|
66 ! #define PATCHLEVEL 10 |
|
67 |
|
68 #endif /* _PATCHLEVEL_H_ */ |
|