5 Patch-ID: readline70-004
7 Bug-Reported-by: Kieran Grant <kieran.thehacker.grant@gmail.com>
8 Bug-Reference-ID: <ec9071ae-efb1-9e09-5d03-e905daf2835c@gmail.com>
9 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2018-02/msg00002.html
13 With certain values for PS1, especially those that wrap onto three or more
14 lines, readline will miscalculate the number of invisible characters,
15 leading to crashes and core dumps.
17 Patch (apply with `patch -p0'):
19 *** ../readline-7.0.3/display.c 2016-07-28 14:49:33.000000000 -0400
20 --- display.c 2018-02-03 19:19:35.000000000 -0500
23 wadjust = (newlines == 0)
24 ? prompt_invis_chars_first_line
25 ! : ((newlines == prompt_lines_estimate) ? wrap_offset : prompt_invis_chars_first_line);
27 /* fix from Darin Johnson <darin@acuson.com> for prompt string with
29 wadjust = (newlines == 0)
30 ? prompt_invis_chars_first_line
31 ! : ((newlines == prompt_lines_estimate)
32 ! ? (wrap_offset - prompt_invis_chars_first_line)
35 /* fix from Darin Johnson <darin@acuson.com> for prompt string with
36 *** ../readline-7.0/patchlevel 2013-11-15 08:11:11.000000000 -0500
37 --- patchlevel 2014-03-21 08:28:40.000000000 -0400
40 # Do not edit -- exists only for use by patch
44 # Do not edit -- exists only for use by patch