diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2003-05-28 12:32:46 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2003-05-28 12:32:46 +0000 |
commit | a281f3a6f27f97fea303971ee4814ef97fdd74e5 (patch) | |
tree | 7362bf753aafb3ad76719cfecb17861183e4d93b /ucb | |
parent | 6cd788c4e50f6079b9db5ff9cea7562d3cab3419 (diff) |
INTEGRATION: CWS fwk04 (1.11.64); FILE MERGED
2003/05/26 08:01:43 abi 1.11.64.2: #i10685# release buffer
2003/05/23 13:27:10 abi 1.11.64.1: #i10685# initialized variable
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/file/filstr.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ucb/source/ucp/file/filstr.cxx b/ucb/source/ucp/file/filstr.cxx index 1f97a912745c..88ae7570ca18 100644 --- a/ucb/source/ucp/file/filstr.cxx +++ b/ucb/source/ucp/file/filstr.cxx @@ -228,9 +228,13 @@ XStream_impl::readBytes( throw io::BufferSizeExceededException(); } - sal_uInt64 nrc; - m_aFile.read( (void* )buffer,sal_uInt64(nBytesToRead),nrc ); - + sal_uInt64 nrc(0); + if(m_aFile.read( (void* )buffer,sal_uInt64(nBytesToRead),nrc ) + != osl::FileBase::E_None) + { + delete[] buffer; + throw io::IOException(); + } aData = uno::Sequence< sal_Int8 > ( buffer, (sal_uInt32)nrc ); delete[] buffer; return ( sal_Int32 ) nrc; |