summaryrefslogtreecommitdiff
path: root/package/source/zipapi/XUnbufferedStream.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'package/source/zipapi/XUnbufferedStream.cxx')
-rw-r--r--package/source/zipapi/XUnbufferedStream.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/source/zipapi/XUnbufferedStream.cxx b/package/source/zipapi/XUnbufferedStream.cxx
index e82e720795d3..d1f65b29b7aa 100644
--- a/package/source/zipapi/XUnbufferedStream.cxx
+++ b/package/source/zipapi/XUnbufferedStream.cxx
@@ -310,7 +310,7 @@ void SAL_CALL XUnbufferedStream::skipBytes( sal_Int32 nBytesToSkip )
sal_Int32 SAL_CALL XUnbufferedStream::available( )
{
//available size must include the prepended header in case of wrapped raw stream
- return static_cast < sal_Int32 > ( mnZipSize + mnHeaderToRead - mnMyCurrent );
+ return static_cast< sal_Int32 > ( std::min< sal_Int64 >( SAL_MAX_INT32, (mnZipSize + mnHeaderToRead - mnMyCurrent) ) );
}
void SAL_CALL XUnbufferedStream::closeInput( )