From 8c004aa108f7b712b377469139baf9f0f53d0c93 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 14 May 2014 09:45:34 +0200 Subject: cid#982783 Unintentional integer overflow Change-Id: Ida52d1fbe3d84c9c0070c91ae24cae58dc4aa13f --- package/source/zipapi/ZipFile.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'package') diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx index 8444dceadf2b..2c8d7e856454 100644 --- a/package/source/zipapi/ZipFile.cxx +++ b/package/source/zipapi/ZipFile.cxx @@ -1097,7 +1097,7 @@ void ZipFile::getSizeAndCRC( sal_Int64 nOffset, sal_Int64 nCompressedSize, sal_I sal_Int32 nBlockSize = static_cast< sal_Int32 > (::std::min( nCompressedSize, static_cast< sal_Int64 >( 32000 ) ) ); aGrabber.seek( nOffset ); - for ( int ind = 0; + for ( sal_Int64 ind = 0; !aInflaterLocal.finished() && aGrabber.readBytes( aBuffer, nBlockSize ) && ind * nBlockSize < nCompressedSize; ind++ ) { -- cgit v1.2.3