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 *** ../bash-4.4.18/lib/readline/display.c 2016-07-28 14:49:33.000000000 -0400
20 --- lib/readline/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 *** ../bash-4.4/patchlevel.h 2016-06-22 14:51:03.000000000 -0400
37 --- patchlevel.h 2016-10-01 11:01:28.000000000 -0400
40 looks for to find the patch level (for the sccs version string). */
42 ! #define PATCHLEVEL 18
44 #endif /* _PATCHLEVEL_H_ */
46 looks for to find the patch level (for the sccs version string). */
48 ! #define PATCHLEVEL 19
50 #endif /* _PATCHLEVEL_H_ */