summaryrefslogtreecommitdiffstats
path: root/imap
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>2000-07-19 09:58:47 +0000
committerThomas Roessler <roessler@does-not-exist.org>2000-07-19 09:58:47 +0000
commit039867ca1baed1173c6511e67ba8a108cfcc9730 (patch)
tree55874e49add54956fefdd97b1ae065c606df05a3 /imap
parent2cfb7e3e9c4a43259f135adff59c590c3ca5e0d6 (diff)
Fix more possible IMAP memory corruption. From Brendan Cully.
Diffstat (limited to 'imap')
-rw-r--r--imap/util.c6
1 files 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;