- apply 5.2-002 patch
This commit is contained in:
parent
1bcdb379ed
commit
a0fe47e4c6
49
readline-5.2-002.patch
Normal file
49
readline-5.2-002.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
READLINE PATCH REPORT
|
||||||
|
=====================
|
||||||
|
|
||||||
|
Readline-Release: 5.2
|
||||||
|
Patch-ID: readline52-002
|
||||||
|
|
||||||
|
Bug-Reported-by: Magnus Svensson <msvensson@mysql.com>
|
||||||
|
Bug-Reference-ID: <45BDC44D.80609@mysql.com>
|
||||||
|
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2007-01/msg00002.html
|
||||||
|
|
||||||
|
Bug-Description:
|
||||||
|
|
||||||
|
Readline neglects to reallocate the array it uses to keep track of wrapped
|
||||||
|
screen lines when increasing its size. This will eventually result in
|
||||||
|
segmentation faults when given sufficiently long input.
|
||||||
|
|
||||||
|
Patch:
|
||||||
|
|
||||||
|
*** ../readline-5.2-patched/display.c Thu Sep 14 14:20:12 2006
|
||||||
|
--- display.c Fri Feb 2 20:23:17 2007
|
||||||
|
***************
|
||||||
|
*** 561,574 ****
|
||||||
|
--- 561,586 ----
|
||||||
|
wrap_offset = prompt_invis_chars_first_line = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ #if defined (HANDLE_MULTIBYTE)
|
||||||
|
#define CHECK_INV_LBREAKS() \
|
||||||
|
do { \
|
||||||
|
if (newlines >= (inv_lbsize - 2)) \
|
||||||
|
{ \
|
||||||
|
inv_lbsize *= 2; \
|
||||||
|
inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \
|
||||||
|
+ _rl_wrapped_line = (int *)xrealloc (_rl_wrapped_line, inv_lbsize * sizeof (int)); \
|
||||||
|
} \
|
||||||
|
} while (0)
|
||||||
|
+ #else
|
||||||
|
+ #define CHECK_INV_LBREAKS() \
|
||||||
|
+ do { \
|
||||||
|
+ if (newlines >= (inv_lbsize - 2)) \
|
||||||
|
+ { \
|
||||||
|
+ inv_lbsize *= 2; \
|
||||||
|
+ inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \
|
||||||
|
+ } \
|
||||||
|
+ } while (0)
|
||||||
|
+ #endif /* HANDLE_MULTIBYTE */
|
||||||
|
|
||||||
|
#if defined (HANDLE_MULTIBYTE)
|
||||||
|
#define CHECK_LPOS() \
|
@ -1,13 +1,14 @@
|
|||||||
Summary: A library for editing typed command lines
|
Summary: A library for editing typed command lines
|
||||||
Name: readline
|
Name: readline
|
||||||
Version: 5.2
|
Version: 5.2
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
License: GPL
|
License: GPL
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
|
URL: http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
|
||||||
Source: ftp://ftp.gnu.org/gnu/readline-%{version}.tar.gz
|
Source: ftp://ftp.gnu.org/gnu/readline-%{version}.tar.gz
|
||||||
Patch1: readline-5.2-shlib.patch
|
Patch1: readline-5.2-shlib.patch
|
||||||
Patch2: readline-5.2-001.patch
|
Patch2: readline-5.2-001.patch
|
||||||
|
Patch3: readline-5.2-002.patch
|
||||||
Requires(post): /sbin/install-info
|
Requires(post): /sbin/install-info
|
||||||
Requires(preun): /sbin/install-info
|
Requires(preun): /sbin/install-info
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
@ -48,6 +49,7 @@ library.
|
|||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1 -b .shlib
|
%patch1 -p1 -b .shlib
|
||||||
%patch2 -p0 -b .001
|
%patch2 -p0 -b .001
|
||||||
|
%patch3 -p0 -b .002
|
||||||
|
|
||||||
rm -f examples/rlfe/configure
|
rm -f examples/rlfe/configure
|
||||||
|
|
||||||
@ -111,6 +113,9 @@ fi
|
|||||||
%{_libdir}/lib*.a
|
%{_libdir}/lib*.a
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Mar 22 2007 Miroslav Lichvar <mlichvar@redhat.com> 5.2-4
|
||||||
|
- apply 5.2-002 patch
|
||||||
|
|
||||||
* Thu Mar 15 2007 Miroslav Lichvar <mlichvar@redhat.com> 5.2-3
|
* Thu Mar 15 2007 Miroslav Lichvar <mlichvar@redhat.com> 5.2-3
|
||||||
- link libreadline with libtinfo (#232277)
|
- link libreadline with libtinfo (#232277)
|
||||||
- include upstream 5.2-001 patch
|
- include upstream 5.2-001 patch
|
||||||
|
Loading…
Reference in New Issue
Block a user