]> git.llucax.com Git - software/mutt-debian.git/commitdiff
584138-mx_update_context-segfault.patch: fix a segfault due to holes in IMAP headers...
authorAntonio Radici <antonio@dyne.org>
Tue, 3 May 2011 20:29:30 +0000 (20:29 +0000)
committerAntonio Radici <antonio@dyne.org>
Tue, 3 May 2011 20:30:09 +0000 (20:30 +0000)
debian/changelog
debian/patches/series
debian/patches/upstream/584138-mx_update_context-segfault.patch [new file with mode: 0644]

index 06eeb56c8c362357dbb7cdf010b198785e45ffef..51013851bbd245ac8d51eb4115f6065763c64884 100644 (file)
@@ -22,6 +22,9 @@ mutt (1.5.21-5) unstable; urgency=low
       (Closes: 624058)
     + 624085-gnutls-deprecated-verify-peers.patch: deprecate
       gnutls_certificate_verify_peers() (Closes: 624085)
+    + 584138-mx_update_context-segfault.patch: fix a segfault due to holes in
+      IMAP headers, 537694-segv-imap-headers.patch is removed as part of this fix
+      (Closes: 584138)
   * debian/patches/compressed-folders: remove partially uncompressed folder if
       the open fails (Closes: 578098)
   * debian/extra/samples/sidebar.muttrc: documented the options that
index 56a66ca91dff1582e244ae7fef75062a9eed6ead..2e550438b9b2f7c522e93d7ceebc21409f2246f7 100644 (file)
@@ -32,7 +32,7 @@ upstream/531430-imapuser.patch
 upstream/537818-emptycharset.patch
 upstream/543467-thread-segfault.patch
 upstream/542817-smimekeys-tmpdir.patch
-upstream/537694-segv-imap-headers.patch
+#upstream/537694-segv-imap-headers.patch
 upstream/548577-gpgme-1.2.patch
 upstream/553321-ansi-escape-segfault.patch
 upstream/568295-references.patch
@@ -49,6 +49,7 @@ upstream/620854-pop3-segfault.patch
 upstream/611412-bts-regexp.patch
 upstream/624058-gnutls-deprecated-set-priority.patch
 upstream/624085-gnutls-deprecated-verify-peers.patch
+upstream/584138-mx_update_context-segfault.patch
 upstream/path_max
 
 mutt.org
diff --git a/debian/patches/upstream/584138-mx_update_context-segfault.patch b/debian/patches/upstream/584138-mx_update_context-segfault.patch
new file mode 100644 (file)
index 0000000..7ace4ad
--- /dev/null
@@ -0,0 +1,44 @@
+Patch written by hhorak@, it should fix a segfault that happens when there are
+holes due to deleted messages, this should fix both #584138 and #537694 (the
+second as a side-effect), therefore the previous
+upstream/537694-segv-imap-headers.patch is removed
+
+This patch was retrieved from the original upstream bug
+http://bugs.mutt.org/3288
+
+--- a/imap/message.c
++++ b/imap/message.c
+@@ -65,7 +65,7 @@
+   char *hdrreq = NULL;
+   FILE *fp;
+   char tempfile[_POSIX_PATH_MAX];
+-  int msgno, idx;
++  int msgno, idx = msgbegin - 1;
+   IMAP_HEADER h;
+   IMAP_STATUS* status;
+   int rc, mfhrc, oldmsgcount;
+@@ -185,7 +185,7 @@
+           continue;
+         }
+-        idx = h.sid - 1;
++        idx++;
+         ctx->hdrs[idx] = imap_hcache_get (idata, h.data->uid);
+         if (ctx->hdrs[idx])
+         {
+@@ -282,13 +282,14 @@
+       {
+         dprint (2, (debugfile, "msg_fetch_header: ignoring fetch response with no body\n"));
+         mfhrc = -1;
++        msgend--;
+         continue;
+       }
+       /* make sure we don't get remnants from older larger message headers */
+       fputs ("\n\n", fp);
+-      idx = h.sid - 1;
++      idx++;
+       if (idx > msgend)
+       {
+         dprint (1, (debugfile, "imap_read_headers: skipping FETCH response for "