From: Chet Ramey Date: Thu, 1 Oct 2020 19:08:13 +0000 (-0400) Subject: commit readline-20201001 snapshot X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=211a987ce68fc8c2d22101aa327de904dfc116a5;p=thirdparty%2Freadline.git commit readline-20201001 snapshot --- diff --git a/CHANGES b/CHANGES index 8c57d10..e4534ad 100644 --- a/CHANGES +++ b/CHANGES @@ -73,6 +73,10 @@ w. If readline is handling a SIGTTOU, make sure SIGTTOU is blocked while executing the terminal cleanup code, since it's no longer run in a signal handling context. +x. Fixed a bug that could cause an application with an application-specific + redisplay function to crash if the line data structures had not been + initialized. + 2. New Features in Readline a. If a second consecutive completion attempt produces matches where the first diff --git a/aclocal.m4 b/aclocal.m4 index ba2446e..6899e82 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -2207,7 +2207,7 @@ main(c, v) exit (255); /* crack s */ - for (i = 0; i < (sizeof(s) - 8); i++) + for (i = 0; i < (sizeof(s) * 8); i++) { n = (s >> i) & 0xff; if (n == 42) diff --git a/display.c b/display.c index 491b7d4..38b3d0e 100644 --- a/display.c +++ b/display.c @@ -3271,6 +3271,9 @@ _rl_update_final (void) { int full_lines, woff, botline_length; + if (line_structures_initialized == 0) + return; + full_lines = 0; /* If the cursor is the only thing on an otherwise-blank last line, compensate so we don't print an extra CRLF. */