From 2a774d6831a0666cbef7925c8bab5d1754f8c1d4 Mon Sep 17 00:00:00 2001 From: Antonio Radici Date: Mon, 11 Apr 2011 16:29:11 +0100 Subject: [PATCH] upstream/620854-pop3-segfault.patch: prevent segfault when $message_cachedir is set and a pop3 mailbox is open (Closes: 620854) --- debian/changelog | 2 ++ debian/patches/series | 1 + debian/patches/upstream/620854-pop3-segfault.patch | 14 ++++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 debian/patches/upstream/620854-pop3-segfault.patch diff --git a/debian/changelog b/debian/changelog index 3162bc3..25618a6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ mutt (1.5.21-4) unstable; urgency=low * debian/paches: + mutt-patched/sidebar: added a closedir() so the fds will not be starved (Closes: 620854) + + upstream/620854-pop3-segfault.patch: prevent segfault when + $message_cachedir is set and a pop3 mailbox is open (Closes: 620854) -- Antonio Radici Mon, 11 Apr 2011 16:23:35 +0100 diff --git a/debian/patches/series b/debian/patches/series index 61c912e..220ff07 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -45,6 +45,7 @@ upstream/578087-header-strchr.patch upstream/603288-split-fetches.patch upstream/537061-dont-recode-saved-attachments.patch upstream/608706-fix-spelling-errors.patch +upstream/620854-pop3-segfault.patch upstream/path_max diff --git a/debian/patches/upstream/620854-pop3-segfault.patch b/debian/patches/upstream/620854-pop3-segfault.patch new file mode 100644 index 0000000..afdffc6 --- /dev/null +++ b/debian/patches/upstream/620854-pop3-segfault.patch @@ -0,0 +1,14 @@ +Fix a segfault that happens when $message_cachedir is set and a POP3 mailbox is +being opened, patch fetched from upstream bug http://bugs.mutt.org/3457 + +--- a/muttlib.c ++++ b/muttlib.c +@@ -1962,6 +1962,7 @@ + { + char *p = safe_strdup (src); + int rc = mutt_convert_string (&p, Charset, "utf-8", 0); +- strfcpy (dest, rc == 0 ? p : src, dlen); ++ /* `src' may be NULL, such as when called from the pop3 driver. */ ++ strfcpy (dest, (rc == 0) ? NONULL(p) : NONULL(src), dlen); + FREE (&p); + } -- 2.43.0