From: Thomas Roessler Date: Mon, 24 Apr 2000 13:10:11 +0000 (+0000) Subject: Fix a segmentation fault with folder completion. From Brendan. X-Git-Tag: mutt-1-1-13-rel~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e00b195e7a1b6e4f272bdf6004f508e416ffd0b2;p=mutt Fix a segmentation fault with folder completion. From Brendan. --- diff --git a/imap/util.c b/imap/util.c index 2d107d3d..2c4262ea 100644 --- a/imap/util.c +++ b/imap/util.c @@ -138,7 +138,12 @@ int imap_parse_path (const char *path, IMAP_MBOX *mx) { return -1; } - mx->mbox = strchr (path, '}') + 1; + mx->mbox = strchr (path, '}'); + if (!(mx->mbox)) + return -1; + else + /* walk past closing '}' */ + (mx->mbox)++; /* Defaults */ mx->flags = 0;