]> git.ipfire.org Git - thirdparty/readline.git/commitdiff
commit readline-20201001 snapshot
authorChet Ramey <chet.ramey@case.edu>
Thu, 1 Oct 2020 19:08:13 +0000 (15:08 -0400)
committerChet Ramey <chet.ramey@case.edu>
Thu, 1 Oct 2020 19:08:13 +0000 (15:08 -0400)
CHANGES
aclocal.m4
display.c

diff --git a/CHANGES b/CHANGES
index 8c57d10dfdff8a52eeeb977ab5d619c92389f4bf..e4534ad50c3d2008431233ef2a6d9b57682a2af8 100644 (file)
--- 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
index ba2446e3b2664fd850ceae4ef7a83e7359456012..6899e8202ae191a98c74db831d3baac4793b2b48 100644 (file)
@@ -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)
index 491b7d417983f2b8bdc6ddcf3377faceb19e5610..38b3d0e761369b3c7c71721c733af64805a72bb2 100644 (file)
--- 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. */