[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync-parse.c,
1.19, 1.20
cras at procontrol.fi
cras at procontrol.fi
Fri Jul 2 15:45:55 EEST 2004
Update of /home/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv18334/lib-storage/index/mbox
Modified Files:
mbox-sync-parse.c
Log Message:
make sure there's only LWSP after X-UID
Index: mbox-sync-parse.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-parse.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- mbox-sync-parse.c 29 Jun 2004 13:18:21 -0000 1.19
+++ mbox-sync-parse.c 2 Jul 2004 12:45:53 -0000 1.20
@@ -199,6 +199,13 @@
value = value*10 + (hdr->full_value[i] - '0');
}
+ for (; i < hdr->full_value_len; i++) {
+ if (!IS_LWSP_LF(hdr->full_value[i])) {
+ /* broken value */
+ return FALSE;
+ }
+ }
+
if (value >= ctx->sync_ctx->next_uid) {
/* next_uid broken - fix it */
ctx->sync_ctx->next_uid = value+1;
More information about the dovecot-cvs
mailing list