summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ucb/source/ucp/file/filinpstr.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/ucb/source/ucp/file/filinpstr.cxx b/ucb/source/ucp/file/filinpstr.cxx
index 107f5605f14c..c0b8aa48b952 100644
--- a/ucb/source/ucp/file/filinpstr.cxx
+++ b/ucb/source/ucp/file/filinpstr.cxx
@@ -161,8 +161,10 @@ XInputStream_impl::readBytes(
//TODO! translate memory exhaustion (if it were detectable...) into
// io::BufferSizeExceededException
- sal_uInt64 nrc;
- m_aFile.read( aData.getArray(),sal_uInt64(nBytesToRead),nrc );
+ sal_uInt64 nrc(0);
+ if(m_aFile.read( aData.getArray(),sal_uInt64(nBytesToRead),nrc )
+ != osl::FileBase::E_None)
+ throw io::IOException();
// Shrink aData in case we read less than nBytesToRead (XInputStream
// documentation does not tell whether this is required, and I do not know