6982855 mutt segfault: mx_update_context+0x32()
authorMarcel Telka <marcel.telka@oracle.com>
Sat, 09 Jul 2011 00:00:09 +0200
changeset 384 cef5d5e02ade
parent 383 e37246d1c149
child 385 7facba1be2c4
6982855 mutt segfault: mx_update_context+0x32()
components/mutt/patches/6982855-imap-segfault-fix.patch
components/mutt/patches/PATCHES.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/mutt/patches/6982855-imap-segfault-fix.patch	Sat Jul 09 00:00:09 2011 +0200
@@ -0,0 +1,49 @@
+Index: imap/message.c
+===================================================================
+--- mutt-1.5.21.orig/imap/message.c	(revision 6121:6572e8bcd723)
++++ mutt-1.5.21/imap/message.c	(revision 6185:0e4f1782ea2e)
[email protected]@ -66,5 +66,5 @@
+   FILE *fp;
+   char tempfile[_POSIX_PATH_MAX];
+-  int msgno, idx;
++  int msgno, idx = msgbegin - 1;
+   IMAP_HEADER h;
+   IMAP_STATUS* status;
[email protected]@ -186,5 +186,5 @@
+         }
+ 
+-        idx = h.sid - 1;
++        idx++;
+         ctx->hdrs[idx] = imap_hcache_get (idata, h.data->uid);
+         if (ctx->hdrs[idx])
[email protected]@ -212,4 +212,5 @@
+           imap_free_header_data((void**) (void*) &h.data);
+           evalhc = 0;
++          idx--;
+         }
+       }
[email protected]@ -274,4 +275,5 @@
+         dprint (2, (debugfile, "msg_fetch_header: ignoring fetch response with no body\n"));
+         mfhrc = -1;
++        msgend--;
+         continue;
+       }
[email protected]@ -280,5 +282,5 @@
+       fputs ("\n\n", fp);
+ 
+-      idx = h.sid - 1;
++      idx++;
+       if (idx > msgend)
+       {
[email protected]@ -286,4 +288,5 @@
+                     "unknown message number %d\n", h.sid));
+         mfhrc = -1;
++        idx--;
+         continue;
+       }
[email protected]@ -293,4 +296,5 @@
+ 	dprint (2, (debugfile, "imap_read_headers: message %d is not new\n",
+ 		    h.sid));
++        idx--;
+ 	continue;
+       }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/mutt/patches/PATCHES.patch	Sat Jul 09 00:00:09 2011 +0200
@@ -0,0 +1,7 @@
+diff -ur mutt-1.5.21.orig/PATCHES mutt-1.5.21/PATCHES
+--- mutt-1.5.21.orig/PATCHES
++++ mutt-1.5.21/PATCHES
[email protected]@ -1,0 +1,3 @@
++In addition, these upstream defects are fixed:
++#3288 seg fault in mx_update_context
++#3392 Whitespace garbage in pager mode