changeset 2263:010088ee72de HEAD

make sure there's only LWSP after X-UID
author Timo Sirainen <tss@iki.fi>
date Fri, 02 Jul 2004 15:45:53 +0300
parents e4c375ab3b30
children a0ffc18d3185
files src/lib-storage/index/mbox/mbox-sync-parse.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-sync-parse.c	Fri Jul 02 15:14:13 2004 +0300
+++ b/src/lib-storage/index/mbox/mbox-sync-parse.c	Fri Jul 02 15:45:53 2004 +0300
@@ -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;