]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: Fix to previous check.
authorTimo Sirainen <tss@iki.fi>
Tue, 5 Apr 2011 16:08:31 +0000 (19:08 +0300)
committerTimo Sirainen <tss@iki.fi>
Tue, 5 Apr 2011 16:08:31 +0000 (19:08 +0300)
src/lib-index/mail-index-map.c

index b5b66d62a44b3500d23ed62921a7e8fa9f7ab193..d535016ab46b63cf7e7ed55b29b74fe67af33e7d 100644 (file)
@@ -169,7 +169,7 @@ mail_index_map_ext_hdr_check_record(const struct mail_index_header *hdr,
        }
        /* a large record size is most likely a bug somewhere. the maximum
           record size is limited to 64k anyway, so try to fail earlier. */
-       if (ext_hdr->record_size > sizeof(uint16_t)/2) {
+       if (ext_hdr->record_size >= 32768) {
                *error_r = "Record size is too large";
                return -1;
        }