This is a two-line fix to a null pointer dereference I just found.  This
bug's been there for a little while, it's not new to version 1.1.  That
code is only used to show RFC 2369 List- headers, and the bug occurs when
there's more than one address in the same List- header, which is why nobody
found it before.  For starters, List- headers are not very common, and of
the ones that exist, 99% of them specify only one address.  Go figure.

Instead of downloading 1.1.2, from
http://www.courier-mta.org/download.php#sqwebmail , the following patch can
be applied instead.  It should apply cleanly to older versions too.


-- 
Sam
Index: sqwebmail/folder.c
===================================================================
RCS file: /cvsroot/courier/courier/webmail/folder.c,v
retrieving revision 1.67
diff -U3 -r1.67 folder.c
--- sqwebmail/folder.c  2000/12/10 03:06:22     1.67
+++ sqwebmail/folder.c  2000/12/18 05:22:50
@@ -1238,8 +1238,11 @@
 
        printf("</A>");
 
-       sai->curindex++;
-       sai->isfirstchar=1;
+       if (sai)
+       {
+               sai->curindex++;
+               sai->isfirstchar=1;
+       }
 
        printf("%s", sep);
 }

Reply via email to