summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-01-17 10:40:20 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-01-17 13:09:40 +0100
commita6b1f367419e2b3645f37b572736f3d504520c16 (patch)
tree3e87e5669363731fa5c94744b21540161a5cfc95 /lotuswordpro
parent5da906d07bf88bb9c56325d03272006d5a0662c4 (diff)
ofz: Use-of-uninitialized-value
Change-Id: I77847175d5ad0b2757eb24fcff08a4caf5d77519 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128494 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwpsdwfileloader.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/lotuswordpro/source/filter/lwpsdwfileloader.cxx b/lotuswordpro/source/filter/lwpsdwfileloader.cxx
index 3a7f05bb477a..bcdb7bb018af 100644
--- a/lotuswordpro/source/filter/lwpsdwfileloader.cxx
+++ b/lotuswordpro/source/filter/lwpsdwfileloader.cxx
@@ -77,12 +77,13 @@ LwpSdwFileLoader::~LwpSdwFileLoader() {}
void LwpSdwFileLoader::CreateDrawObjects(std::vector<rtl::Reference<XFFrame>>* pDrawObjVector)
{
unsigned char BinSignature[2];
- m_pStream->ReadBytes(BinSignature, 2);
+ if (m_pStream->ReadBytes(BinSignature, 2) != 2)
+ return;
if (BinSignature[0] != 'S' || BinSignature[1] != 'M')
return;
- unsigned short nVersion;
+ unsigned short nVersion(0);
m_pStream->ReadUInt16(nVersion);
m_pStream->Seek(0);