]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/readline/readline52-002
Merge branch 'kernel-update' of ssh://git.ipfire.org/pub/git/ipfire-2.x into kernel...
[people/teissler/ipfire-2.x.git] / src / patches / readline / readline52-002
1 READLINE PATCH REPORT
2 =====================
3
4 Readline-Release: 5.2
5 Patch-ID: readline52-002
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 *** ../readline-5.2-patched/display.c Thu Sep 14 14:20:12 2006
20 --- 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() \