]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
make sure there's only LWSP after X-UID
authorTimo Sirainen <tss@iki.fi>
Fri, 2 Jul 2004 12:45:53 +0000 (15:45 +0300)
committerTimo Sirainen <tss@iki.fi>
Fri, 2 Jul 2004 12:45:53 +0000 (15:45 +0300)
--HG--
branch : HEAD

src/lib-storage/index/mbox/mbox-sync-parse.c

index 18a45aaffcabfb9e76971f43564f67e845aa06eb..732b7d75cd989fab1b8f06638b89f6bb98639af3 100644 (file)
@@ -199,6 +199,13 @@ static int parse_x_uid(struct mbox_sync_mail_context *ctx,
                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;