From 264ee159fbaee3a653d975083c419d36d9ed1715 Mon Sep 17 00:00:00 2001 From: Antonio Radici Date: Wed, 27 May 2009 23:23:59 +0100 Subject: [PATCH 1/1] IMAP: only close socket when not already disconnected (Closes: 493719) --- debian/changelog | 5 +++-- debian/patches/series | 1 + .../upstream/493719-segfault-imap-close.patch | 20 +++++++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 debian/patches/upstream/493719-segfault-imap-close.patch diff --git a/debian/changelog b/debian/changelog index e27ab0f..ae2a68f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,7 @@ mutt (1.5.19-4) unstable; urgency=low * debian/rules: - + disable tokyocabinet as backend so it won't be accidentally compiled - (Closes: 530670) + + disable tokyocabinet as backend so it won't be used (Closes: 530670) * debian/control: + added pkg-config to Build-Depends * patches/debian-specific/529838-gnutls-autoconf.patch: @@ -13,6 +12,8 @@ mutt (1.5.19-4) unstable; urgency=low + mutt does not segfault when the last mailbox is removed (Closes: 439387) * patches/upstream/375530-index-weirdness.patch + fix index weirdness if mailbox is emptied (Closes: 375530) + * patches/upstream/493719-segfault-imap-close.patch + + IMAP: only close socket when not already disconnected (Closes: 493719) -- Antonio Radici Tue, 26 May 2009 23:42:51 +0100 diff --git a/debian/patches/series b/debian/patches/series index 766a143..1542a93 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -31,6 +31,7 @@ upstream/500016-temp-cache-fix.patch upstream/508988-inode-sort.patch upstream/530661-mandatory-doubledash.patch upstream/375530-index-weirdness.patch +upstream/493719-segfault-imap-close.patch misc/hyphen-as-minus.patch misc/smime_keys-manpage.patch diff --git a/debian/patches/upstream/493719-segfault-imap-close.patch b/debian/patches/upstream/493719-segfault-imap-close.patch new file mode 100644 index 0000000..ed6671f --- /dev/null +++ b/debian/patches/upstream/493719-segfault-imap-close.patch @@ -0,0 +1,20 @@ +IMAP: only close socket when not already disconnected. +closes http://bugs.mutt.org/3161 and +http://bugs.debian.org/493719 + +--- a/imap/imap.c ++++ b/imap/imap.c +@@ -488,8 +488,11 @@ + + void imap_close_connection(IMAP_DATA* idata) + { +- mutt_socket_close (idata->conn); +- idata->state = IMAP_DISCONNECTED; ++ if (idata->state != IMAP_DISCONNECTED) ++ { ++ mutt_socket_close (idata->conn); ++ idata->state = IMAP_DISCONNECTED; ++ } + idata->seqno = idata->nextcmd = idata->lastcmd = idata->status = 0; + memset (idata->cmds, 0, sizeof (IMAP_COMMAND) * idata->cmdslots); + } -- 2.43.0