From: Timo Sirainen Date: Tue, 5 Feb 2019 03:25:13 +0000 (-0800) Subject: fts: Fix buffer overflow when reading oversized fts header X-Git-Tag: 2.2.36.3~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d781a50c1f26ade88f9c96fa2931364e7fa8cc0b;p=thirdparty%2Fdovecot%2Fcore.git fts: Fix buffer overflow when reading oversized fts header --- diff --git a/src/plugins/fts/fts-api.c b/src/plugins/fts/fts-api.c index 5a5b2a919e..4f8a1c125d 100644 --- a/src/plugins/fts/fts-api.c +++ b/src/plugins/fts/fts-api.c @@ -425,7 +425,7 @@ bool fts_index_get_header(struct mailbox *box, struct fts_index_header *hdr_r) i_zero(hdr_r); ret = FALSE; } else { - memcpy(hdr_r, data, data_size); + memcpy(hdr_r, data, sizeof(*hdr_r)); ret = TRUE; } mail_index_view_close(&view);