]> granicus.if.org Git - mutt/commitdiff
Fix more possible IMAP memory corruption. From Brendan Cully.
authorThomas Roessler <roessler@does-not-exist.org>
Wed, 19 Jul 2000 09:58:47 +0000 (09:58 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Wed, 19 Jul 2000 09:58:47 +0000 (09:58 +0000)
imap/util.c

index e118c87d00cac4afed0bd1872ed793185b2d8af4..e6e15d381003513194e284e0400329950f3e0c74 100644 (file)
@@ -159,12 +159,12 @@ int imap_parse_path (const char *path, IMAP_MBOX *mx)
   {
     return -1;
   }
-  mx->mbox = strchr (path, '}');
-  if (!(mx->mbox))
+  c = strchr (path, '}');
+  if (!c)
     return -1;
   else
     /* walk past closing '}' */
-    (mx->mbox)++;
+    mx->mbox = safe_strdup (c+1);
   
   /* Defaults */
   mx->flags = 0;