summaryrefslogtreecommitdiff
path: root/hwpfilter/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-07-22 21:30:59 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-07-23 11:52:34 +0200
commit7e164e4dcdda66f4077872065a5d2412d5130bc3 (patch)
tree2d4e8044158672acdcee2899e89fb7fc77931b71 /hwpfilter/source
parent27ad68a95b513bfed5f837b66495cc210d044321 (diff)
ofz#49217 Out-of-memory
just abandon in this case Change-Id: I2234f130e3c8de0b044256921f5d6941acc72e59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154769 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'hwpfilter/source')
-rw-r--r--hwpfilter/source/hwpread.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/hwpfilter/source/hwpread.cxx b/hwpfilter/source/hwpread.cxx
index a77f380b5055..302879802a6b 100644
--- a/hwpfilter/source/hwpread.cxx
+++ b/hwpfilter/source/hwpread.cxx
@@ -21,6 +21,7 @@
#include <comphelper/newarray.hxx>
#include <unotools/configmgr.hxx>
+#include <sal/log.hxx>
#include <tools/long.hxx>
#include <assert.h>
@@ -490,7 +491,11 @@ bool Picture::Read(HWPFile & hwpf)
if (nBlock != nReadBlock)
break;
if (nMaxAllowedDecompression && follow.size() > nMaxAllowedDecompression)
- break;
+ {
+ SAL_WARN("filter.hwp", "too much decompression, abandoning");
+ follow.clear();
+ return false;
+ }
}
follow_block_size = follow.size();