~ubuntu-branches/ubuntu/vivid/mutt/vivid-updates

« back to all changes in this revision

Viewing changes to debian/patches/upstream/620854-pop3-segfault.patch

  • Committer: Package Import Robot
  • Author(s): Antonio Radici
  • Date: 2011-04-11 16:23:35 UTC
  • Revision ID: package-import@ubuntu.com-20110411162335-t8iu29pnqzgpql5w
Tags: 1.5.21-4
* 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)
* debian/control:
  + Standards-Version upgraded to 3.9.2.0, no changes required

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Fix a segfault that happens when $message_cachedir is set and a POP3 mailbox is
 
2
being opened, patch fetched from upstream bug http://bugs.mutt.org/3457
 
3
 
 
4
--- a/muttlib.c
 
5
+++ b/muttlib.c
 
6
@@ -1962,6 +1962,7 @@
 
7
 {
 
8
   char *p = safe_strdup (src);
 
9
   int rc = mutt_convert_string (&p, Charset, "utf-8", 0);
 
10
-  strfcpy (dest, rc == 0 ? p : src, dlen);
 
11
+  /* `src' may be NULL, such as when called from the pop3 driver. */
 
12
+  strfcpy (dest, (rc == 0) ? NONULL(p) : NONULL(src), dlen);
 
13
   FREE (&p);
 
14
 }