hwpfilter/source/hwpread.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
New commits: commit 998ee89bcaf42697b5541008787ce05ecbe608d4 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sat Apr 10 20:49:45 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sun Apr 11 12:07:10 2021 +0200 ofz#31685 give up on large tables to avoid Timeout Change-Id: I99a7cdede74c4e8a661579467624f21fcf9132df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113931 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/hwpfilter/source/hwpread.cxx b/hwpfilter/source/hwpread.cxx index ca2a2eff534e..b3eb5504a0d6 100644 --- a/hwpfilter/source/hwpread.cxx +++ b/hwpfilter/source/hwpread.cxx @@ -283,7 +283,12 @@ bool TxtBox::Read(HWPFile & hwpf) UpdateBBox(this); ncell = nCell; - if (ncell <= 0){ + if (ncell <= 0) { + return hwpf.SetState(HWP_InvalidFileFormat); + } + + if (ncell > 4096 && utl::ConfigManager::IsFuzzing()) { + // cut off at an arbitary size to speed up fuzzing return hwpf.SetState(HWP_InvalidFileFormat); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits