summaryrefslogtreecommitdiffstats
path: root/lotuswordpro/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-01-13 16:57:48 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-01-13 20:25:11 +0100
commit444477a07bcaf59181dbbc719b913566091deadc (patch)
treefef9b0f5f0d4827478b9b4d27962b6f81b4a42c9 /lotuswordpro/source
parentset hint_metrics seperately from hint_style (diff)
downloadcore-444477a07bcaf59181dbbc719b913566091deadc.tar.gz
core-444477a07bcaf59181dbbc719b913566091deadc.zip
ofz#43577 valid reclen must be >= 20
Change-Id: I454bff4acfcd85701a7f094a8bd76898825e9ce2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128388 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'lotuswordpro/source')
-rw-r--r--lotuswordpro/source/filter/lwpdrawobj.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx
index 55d23be1ef7b..0e78359fa0c6 100644
--- a/lotuswordpro/source/filter/lwpdrawobj.cxx
+++ b/lotuswordpro/source/filter/lwpdrawobj.cxx
@@ -1362,6 +1362,9 @@ void LwpDrawBitmap::Read()
m_pStream->ReadUInt16( m_aBmpRec.nTranslation );
m_pStream->ReadUInt16( m_aBmpRec.nRotation );
+ if (m_aObjHeader.nRecLen < 20)
+ throw BadRead();
+
// 20 == length of draw-specific fields.
// 14 == length of bmp file header.
m_aBmpRec.nFileSize = m_aObjHeader.nRecLen - 20 + 14;