[dovecot-cvs] dovecot/src/imap cmd-create.c,1.12,1.13
cras at dovecot.org
cras at dovecot.org
Sat Apr 23 22:56:53 EEST 2005
Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv2178
Modified Files:
cmd-create.c
Log Message:
Don't do invalid memory accesses if trying to create empty mailbox name.
Index: cmd-create.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-create.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- cmd-create.c 5 Feb 2005 18:07:26 -0000 1.12
+++ cmd-create.c 23 Apr 2005 19:56:51 -0000 1.13
@@ -20,7 +20,8 @@
return TRUE;
len = strlen(mailbox);
- if (mailbox[len-1] != mail_storage_get_hierarchy_sep(storage))
+ if (len == 0 ||
+ mailbox[len-1] != mail_storage_get_hierarchy_sep(storage))
directory = FALSE;
else {
/* name ends with hierarchy separator - client is just
More information about the dovecot-cvs
mailing list