]>
Commit | Line | Data |
---|---|---|
24acfa14 MT |
1 | BASH PATCH REPORT |
2 | ================= | |
3 | ||
4 | Bash-Release: 3.2 | |
5 | Patch-ID: bash32-013 | |
6 | ||
7 | Bug-Reported-by: Magnus Svensson <msvensson@mysql.com> | |
8 | Bug-Reference-ID: <45BDC44D.80609@mysql.com> | |
9 | Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2007-01/msg00002.html | |
10 | ||
11 | Bug-Description: | |
12 | ||
13 | Readline neglects to reallocate the array it uses to keep track of wrapped | |
14 | screen lines when increasing its size. This will eventually result in | |
15 | segmentation faults when given sufficiently long input. | |
16 | ||
17 | Patch: | |
18 | ||
19 | *** ../bash-3.2-patched/lib/readline/display.c Thu Sep 14 14:20:12 2006 | |
20 | --- lib/readline/display.c Fri Feb 2 20:23:17 2007 | |
21 | *************** | |
22 | *** 561,574 **** | |
23 | --- 561,586 ---- | |
24 | wrap_offset = prompt_invis_chars_first_line = 0; | |
25 | } | |
26 | ||
27 | + #if defined (HANDLE_MULTIBYTE) | |
28 | #define CHECK_INV_LBREAKS() \ | |
29 | do { \ | |
30 | if (newlines >= (inv_lbsize - 2)) \ | |
31 | { \ | |
32 | inv_lbsize *= 2; \ | |
33 | inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ | |
34 | + _rl_wrapped_line = (int *)xrealloc (_rl_wrapped_line, inv_lbsize * sizeof (int)); \ | |
35 | } \ | |
36 | } while (0) | |
37 | + #else | |
38 | + #define CHECK_INV_LBREAKS() \ | |
39 | + do { \ | |
40 | + if (newlines >= (inv_lbsize - 2)) \ | |
41 | + { \ | |
42 | + inv_lbsize *= 2; \ | |
43 | + inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ | |
44 | + } \ | |
45 | + } while (0) | |
46 | + #endif /* HANDLE_MULTIBYTE */ | |
47 | ||
48 | #if defined (HANDLE_MULTIBYTE) | |
49 | #define CHECK_LPOS() \ | |
50 | ||
51 | *** ../bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 | |
52 | --- patchlevel.h Mon Oct 16 14:22:54 2006 | |
53 | *************** | |
54 | *** 26,30 **** | |
55 | looks for to find the patch level (for the sccs version string). */ | |
56 | ||
57 | ! #define PATCHLEVEL 12 | |
58 | ||
59 | #endif /* _PATCHLEVEL_H_ */ | |
60 | --- 26,30 ---- | |
61 | looks for to find the patch level (for the sccs version string). */ | |
62 | ||
63 | ! #define PATCHLEVEL 13 | |
64 | ||
65 | #endif /* _PATCHLEVEL_H_ */ |