]> granicus.if.org Git - mutt/commitdiff
Fix a segmentation fault with folder completion. From Brendan.
authorThomas Roessler <roessler@does-not-exist.org>
Mon, 24 Apr 2000 13:10:11 +0000 (13:10 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Mon, 24 Apr 2000 13:10:11 +0000 (13:10 +0000)
imap/util.c

index 2d107d3d791178194faf410ca15f9841af55faf4..2c4262ea98b63f5c89e6f14ab6f0256a5d2e2542 100644 (file)
@@ -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;