summaryrefslogtreecommitdiffstats
path: root/sot
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-11-01 16:18:27 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-11-01 21:02:11 +0000
commitb59196e1d7843367a80fb67288949eb4a6c4c463 (patch)
tree4c500e41da3a46ecf0063a73f2923d7bd69e3fc2 /sot
parentcoverity#1250404 Operands don't affect result (diff)
downloadcore-b59196e1d7843367a80fb67288949eb4a6c4c463.tar.gz
core-b59196e1d7843367a80fb67288949eb4a6c4c463.zip
coverity#1247614 Unchecked return value
Change-Id: I658a7f6c8410cfa38512bb45651e5332fbde3194
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/ucbstorage.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index b5c12cdc3c44..6f66c25b7621 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -2835,7 +2835,12 @@ BaseStorage* UCBStorage::OpenStorage_Impl( const OUString& rEleName, StreamMode
}
pElement->m_xStream->PrepareCachedForReopen( nMode );
- pElement->m_xStream->Init();
+ bool bInited = pElement->m_xStream->Init();
+ if (!bInited)
+ {
+ SetError( ( nMode & STREAM_WRITE ) ? SVSTREAM_CANNOT_MAKE : SVSTREAM_FILE_NOT_FOUND );
+ return NULL;
+ }
pElement->m_bIsStorage = true;
return pElement->m_xStream->CreateStorage(); // can only be created in transacted mode