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>
This commit is contained in:
Caolán McNamara 2023-07-22 21:30:59 +01:00
parent 27ad68a95b
commit 7e164e4dcd

View file

@ -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();