diff options
Diffstat (limited to 'io/source/connector/ctr_pipe.cxx')
-rw-r--r-- | io/source/connector/ctr_pipe.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/io/source/connector/ctr_pipe.cxx b/io/source/connector/ctr_pipe.cxx index df1529173ba6..dafdc4208019 100644 --- a/io/source/connector/ctr_pipe.cxx +++ b/io/source/connector/ctr_pipe.cxx @@ -49,11 +49,16 @@ namespace stoc_connector { { 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() , aReadBytes.getLength() ); + if( n < aReadBytes.getLength() ) + { + aReadBytes.realloc( n ); + } + return n; } else { throw IOException(); |