diff options
Diffstat (limited to 'hwpfilter/source')
-rw-r--r-- | hwpfilter/source/hwpread.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
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); } |