From 039867ca1baed1173c6511e67ba8a108cfcc9730 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Wed, 19 Jul 2000 09:58:47 +0000 Subject: [PATCH] Fix more possible IMAP memory corruption. From Brendan Cully. --- imap/util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/imap/util.c b/imap/util.c index e118c87d..e6e15d38 100644 --- a/imap/util.c +++ b/imap/util.c @@ -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; -- 2.40.0