[dovecot-cvs] dovecot/src/lib-index mail-index-update.c,1.44,1.45

cras at procontrol.fi cras at procontrol.fi
Mon Jan 6 20:54:38 EET 2003


Update of /home/cvs/dovecot/src/lib-index
In directory danu:/tmp/cvs-serv9576/lib-index

Modified Files:
	mail-index-update.c 
Log Message:
message_part_deserialize() now verifies that the data is valid so we don't
later crash to some assert.



Index: mail-index-update.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-index-update.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- mail-index-update.c	5 Jan 2003 13:09:52 -0000	1.44
+++ mail-index-update.c	6 Jan 2003 18:54:36 -0000	1.45
@@ -413,7 +413,7 @@
 	struct message_size hdr_size, body_size;
 	pool_t pool;
 	buffer_t *buf;
-	const char *value;
+	const char *value, *error;
 	size_t size;
 	uoff_t start_offset;
 
@@ -439,11 +439,13 @@
 		if (value == NULL)
 			part = NULL;
 		else {
-			part = message_part_deserialize(pool, value, size);
+			part = message_part_deserialize(pool, value, size,
+							&error);
 			if (part == NULL) {
 				/* corrupted, rebuild it */
 				index_set_corrupted(update->index,
-					"Corrupted cached MessagePart data");
+					"Corrupted cached MessagePart data "
+					"(%s)", error);
 			}
 		}
 




More information about the dovecot-cvs mailing list