3f91a79
--- texinfo-4.11/info/window.c_old	2007-07-01 23:20:31.000000000 +0200
3f91a79
+++ texinfo-4.11/info/window.c	2007-11-13 10:52:44.000000000 +0100
3f91a79
@@ -1,5 +1,5 @@
3f91a79
 /* window.c -- windows in Info.
3f91a79
-   $Id: texinfo-4.11-res_win_segfault.patch,v 1.1 2007/11/13 12:08:52 vcrhonek Exp $
3f91a79
+   $Id: texinfo-4.11-res_win_segfault.patch,v 1.1 2007/11/13 12:08:52 vcrhonek Exp $
3f91a79
 
3f91a79
    Copyright (C) 1993, 1997, 1998, 2001, 2002, 2003, 2004, 2007
3f91a79
    Free Software Foundation, Inc.
3f91a79
@@ -249,9 +249,22 @@
3f91a79
               break;
3f91a79
             }
3f91a79
           else
3f91a79
-            win= win->next;
3f91a79
+            win = win->next;
3f91a79
         }
3f91a79
     }
3f91a79
+
3f91a79
+  /* One more loop.  If any heights or widths have become negative,
3f91a79
+     set them to zero.  This can apparently happen with resizing down to
3f91a79
+     very small sizes.  Sadly, it is not apparent to me where in the
3f91a79
+     above calculations it goes wrong.  */
3f91a79
+  for (win = windows; win; win = win->next)
3f91a79
+    {
3f91a79
+      if (win->height < 0)
3f91a79
+        win->height = 0;
3f91a79
+
3f91a79
+      if (win->width < 0)
3f91a79
+        win->width = 0;
3f91a79
+    }
3f91a79
 }
3f91a79
 
3f91a79
 /* Make a new window showing NODE, and return that window structure.
3f91a79
--- texinfo-4.11/info/display.c_old	2007-07-01 23:20:29.000000000 +0200
3f91a79
+++ texinfo-4.11/info/display.c	2007-11-13 10:53:58.000000000 +0100
3f91a79
@@ -1,5 +1,5 @@
3f91a79
 /* display.c -- How to display Info windows.
3f91a79
-   $Id: texinfo-4.11-res_win_segfault.patch,v 1.1 2007/11/13 12:08:52 vcrhonek Exp $
3f91a79
+   $Id: texinfo-4.11-res_win_segfault.patch,v 1.1 2007/11/13 12:08:52 vcrhonek Exp $
3f91a79
 
3f91a79
    Copyright (C) 1993, 1997, 2003, 2004, 2006, 2007
3f91a79
    Free Software Foundation, Inc.
3f91a79
@@ -136,8 +136,13 @@
3f91a79
   if (display_inhibited)
3f91a79
     display_was_interrupted_p = 1;
3f91a79
 
3f91a79
-  /* If the window has no height, or display is inhibited, quit now. */
3f91a79
-  if (!win->height || display_inhibited)
3f91a79
+  /* If the window has no height, or display is inhibited, quit now.
3f91a79
+     Strictly speaking, it should only be necessary to test if the
3f91a79
+     values are equal to zero, since window_new_screen_size should
3f91a79
+     ensure that the window height/width never becomes negative, but
3f91a79
+     since historically this has often been the culprit for crashes, do
3f91a79
+     our best to be doubly safe.  */
3f91a79
+  if (win->height <= 0 || win->width <= 0 || display_inhibited)
3f91a79
     return;
3f91a79
 
3f91a79
   /* If the window's first row doesn't appear in the_screen, then it