dovecot-2.0: mailbox_name_get_sha128() truncated the returned GU...

dovecot at dovecot.org dovecot at dovecot.org
Mon Feb 8 22:48:40 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/cf6f3ce452d3
changeset: 10671:cf6f3ce452d3
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Feb 08 22:48:22 2010 +0200
description:
mailbox_name_get_sha128() truncated the returned GUID too early.

diffstat:

1 file changed, 1 insertion(+), 1 deletion(-)
src/lib-storage/mailbox-list.c |    2 +-

diffs (12 lines):

diff -r 64c8e5e792e9 -r cf6f3ce452d3 src/lib-storage/mailbox-list.c
--- a/src/lib-storage/mailbox-list.c	Sun Feb 07 19:51:51 2010 +0200
+++ b/src/lib-storage/mailbox-list.c	Mon Feb 08 22:48:22 2010 +0200
@@ -826,7 +826,7 @@ void mailbox_name_get_sha128(const char 
 	unsigned char sha[SHA1_RESULTLEN];
 
 	sha1_get_digest(name, strlen(name), sha);
-	memcpy(guid, sha, I_MIN(sizeof(guid), sizeof(sha)));
+	memcpy(guid, sha, I_MIN(MAIL_GUID_128_SIZE, sizeof(sha)));
 }
 
 struct mailbox_log *mailbox_list_get_changelog(struct mailbox_list *list)


More information about the dovecot-cvs mailing list