diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 2000-07-19 09:58:47 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 2000-07-19 09:58:47 +0000 |
commit | 039867ca1baed1173c6511e67ba8a108cfcc9730 (patch) | |
tree | 55874e49add54956fefdd97b1ae065c606df05a3 /imap | |
parent | 2cfb7e3e9c4a43259f135adff59c590c3ca5e0d6 (diff) |
Fix more possible IMAP memory corruption. From Brendan Cully.
Diffstat (limited to 'imap')
-rw-r--r-- | imap/util.c | 6 |
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; |