Ticket #36839: 1a4c43138685.diff

File 1a4c43138685.diff, 720 bytes (added by kchr@…, 12 years ago)

Patch for #28269

  • muttlib.c

    # HG changeset patch
    # User Michael Elkins <me@mutt.org>
    # Date 1285942464 25200
    # Node ID 1a4c43138685b628dedb14932934ff392104ac72
    # Parent  c10f8863e979e6f7fa61649128e3b659b4cd8827
    fix segfault when $message_cachedir is set and opening a POP3 mailbox.
    
    fixes #3457
    
    diff -r c10f8863e979 -r 1a4c43138685 muttlib.c
    a b  
    19601960{
    19611961  char *p = safe_strdup (src);
    19621962  int rc = mutt_convert_string (&p, Charset, "utf-8", 0);
    1963   strfcpy (dest, rc == 0 ? p : src, dlen);
     1963  /* `src' may be NULL, such as when called from the pop3 driver. */
     1964  strfcpy (dest, (rc == 0) ? NONULL(p) : NONULL(src), dlen);
    19641965  FREE (&p);
    19651966}