Commit cce676e6 authored by Michael Elkins's avatar Michael Elkins

fix segfault when $message_cachedir is set and opening a POP3 mailbox.

fixes #3457
parent e9059e2d
......@@ -1960,6 +1960,7 @@ void mutt_encode_path (char *dest, size_t dlen, const char *src)
{
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);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment