summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-01-19 20:43:58 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-01-20 09:44:16 +0100
commite9443070888628f7643741c1abcaaef28de6a53f (patch)
tree14f468f3f784b5f6bc67b647f05e663ccc7f6175 /lotuswordpro
parentce8745f01a14a16c30e0ef62bc0a34ad4f7f4d0e (diff)
ofz: Use-of-uninitialized-value
Change-Id: Ia19985b7c042e6ab9608220343e3b678890f7215 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128638 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx11
1 files changed, 3 insertions, 8 deletions
diff --git a/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx b/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx
index 35920fb2e7ec..47362c809892 100644
--- a/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx
+++ b/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx
@@ -238,20 +238,15 @@ XFDrawGroup* LwpSdwGroupLoaderV0102::CreateDrawGroupObject()
{
//flag
unsigned char BinSignature[2];
- m_pStream->ReadBytes(BinSignature, 2);
+ if (m_pStream->ReadBytes(BinSignature, 2) != 2)
+ return nullptr;
if (BinSignature[0] != 'S' || BinSignature[1] != 'M')
- {
- assert(false);
return nullptr;
- }
//version
- unsigned short nVersion;
+ unsigned short nVersion(0);
m_pStream->ReadUInt16(nVersion);
if (nVersion<0x0102)
- {
- assert(false);
return nullptr;
- }
// topObj, botObj
m_pStream->SeekRel(4);
//record count