[dovecot-cvs] dovecot/src/lib-index mail-transaction-util.c, 1.17, 1.18

cras at dovecot.org cras at dovecot.org
Sat Sep 11 21:01:12 EEST 2004


Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv30593

Modified Files:
	mail-transaction-util.c 
Log Message:
more extra intro fixes



Index: mail-transaction-util.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-transaction-util.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- mail-transaction-util.c	5 Sep 2004 17:53:45 -0000	1.17
+++ mail-transaction-util.c	11 Sep 2004 18:01:10 -0000	1.18
@@ -156,6 +156,11 @@
 			break;
 
 		for (i = 0; i < hdr->size; ) {
+			if (i + sizeof(*rec) > hdr->size) {
+				/* should be just extra padding */
+				break;
+			}
+
 			rec = CONST_PTR_OFFSET(data, i);
 			ret = func_map->extra_intro(rec, context);
 			if (ret <= 0)



More information about the dovecot-cvs mailing list