summaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
authorRelease Engineering <releng@openoffice.org>2011-02-18 11:14:19 +0100
committerRelease Engineering <releng@openoffice.org>2011-02-18 11:14:19 +0100
commitea713649e558dcec291302bffd00b148a96e33a8 (patch)
treecfd191ca277fdd42ccdd6489e57e421a2c63470c /io
parenta60533f101359e6b506dcf0ff4d26956aa76df37 (diff)
parent677395ac556e88a674e21a5406875d72b140d241 (diff)
merged DEV300
Notes
Notes: split repo tag: ure_ooo/DEV300_m101
Diffstat (limited to 'io')
-rw-r--r--io/source/acceptor/acc_pipe.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/io/source/acceptor/acc_pipe.cxx b/io/source/acceptor/acc_pipe.cxx
index 6d0b77484fef..63f688d32dca 100644
--- a/io/source/acceptor/acc_pipe.cxx
+++ b/io/source/acceptor/acc_pipe.cxx
@@ -101,11 +101,17 @@ namespace io_acceptor
{
if( ! m_nStatus )
{
- if( aReadBytes.getLength() != nBytesToRead )
+ if( aReadBytes.getLength() < nBytesToRead )
{
aReadBytes.realloc( nBytesToRead );
}
- return m_pipe.read( aReadBytes.getArray() , aReadBytes.getLength() );
+ sal_Int32 n = m_pipe.read( aReadBytes.getArray(), nBytesToRead );
+ OSL_ASSERT( n >= 0 && n <= aReadBytes.getLength() );
+ if( n < aReadBytes.getLength() )
+ {
+ aReadBytes.realloc( n );
+ }
+ return n;
}
else {
throw IOException();