irssi-import / bugs.irssi.org

bugs.irssi.org archive
https://github.com/irssi/irssi/issues
0 stars 0 forks source link

irssi can crash if the term ysize is lowered during the irssi initialization #836

Closed irssibot closed 12 years ago

irssibot commented 12 years ago

Irssi can crash if the term ysize is lowered during the irssi initialization. The proposed fix is attached. Original report: http://bugzilla.redhat.com/show_bug.cgi?id=796457

irssibot commented 12 years ago

irssi-0.8.15-init-resize-crash-fix.patch

diff -up irssi-0.8.15/src/fe-text/irssi.c.old irssi-0.8.15/src/fe-text/irssi.c
diff -up irssi-0.8.15/src/fe-text/mainwindows.c.old irssi-0.8.15/src/fe-text/mainwindows.c
--- irssi-0.8.15/src/fe-text/mainwindows.c.old  2010-04-03 18:19:42.000000000 +0200
+++ irssi-0.8.15/src/fe-text/mainwindows.c  2012-02-24 10:47:51.215293213 +0100
@@ -355,7 +355,7 @@ static void mainwindows_resize_smaller(i
         int space;

    sorted = mainwindows_get_sorted(TRUE);
-   for (;;) {
+   for (;sorted != NULL;) {
        space = 0;
        for (tmp = mainwindows; tmp != NULL; tmp = tmp->next) {
            rec = tmp->data;
irssibot commented 12 years ago

Fixed in r5217.