summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
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);