texinfo (4.13a.dfsg.1-10) info_core_dump_small_window

Summary

 info/window.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

    
download this patch

Patch contents

--- texinfo-4.13a.dfsg.1.orig/info/window.c	2008-09-18 20:31:59.000000000 +0200
+++ texinfo-4.13a.dfsg.1/info/window.c	2011-02-09 15:51:46.000000000 +0100
@@ -923,7 +923,13 @@
         break;
     }
 
-  return i - 1;
+  /* Something is wrong with the above logic as it allows a negative
+     index to be returned for small windows.  Until someone figures it
+     out, at least don't core dump. */
+  if (i>0)
+    return i - 1;
+  else
+    return 0;
 }
 
 /* Get and return the goal column for this window. */