[Libreoffice-commits] core.git: sot/source
Caolán McNamara
caolanm at redhat.com
Mon Oct 2 08:46:36 UTC 2017
sot/source/sdstor/stgio.cxx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit b4d9f5d4d6475565530d8f698bd8f72fc685b491
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Oct 1 20:58:49 2017 +0100
coverity#1418672 silence Explicit null deref
Change-Id: I9c39da02a344316b09c190a3c12bdb17201cf176
Reviewed-on: https://gerrit.libreoffice.org/43027
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sot/source/sdstor/stgio.cxx b/sot/source/sdstor/stgio.cxx
index 15774bf64a2b..44b245f5f01d 100644
--- a/sot/source/sdstor/stgio.cxx
+++ b/sot/source/sdstor/stgio.cxx
@@ -89,6 +89,7 @@ void StgIo::SetupStreams()
m_pDataStrm = nullptr;
m_pFAT = nullptr;
ResetError();
+
short nPhysPageSize = 1 << m_aHdr.GetPageSize();
SetPhysPageSize(nPhysPageSize);
sal_Int32 nFatStrmSize;
@@ -98,12 +99,11 @@ void StgIo::SetupStreams()
SetError(SVSTREAM_FILEFORMAT_ERROR);
m_pFAT = nullptr;
m_pTOC = nullptr;
+ return;
}
- else
- {
- m_pFAT = new StgFATStrm(*this, nFatStrmSize);
- m_pTOC = new StgDirStrm( *this );
- }
+
+ m_pFAT = new StgFATStrm(*this, nFatStrmSize);
+ m_pTOC = new StgDirStrm(*this);
if( !GetError() )
{
StgDirEntry* pRoot = m_pTOC->GetRoot();
More information about the Libreoffice-commits
mailing list