throw earlier on broken zip streams
Change-Id: I0de705b4c6a9176e98baed21b2cd960d4d091563
This commit is contained in:
@@ -78,6 +78,10 @@ XUnbufferedStream::XUnbufferedStream(
|
||||
mnZipSize = maEntry.nSize;
|
||||
mnZipEnd = maEntry.nMethod == DEFLATED ? maEntry.nOffset + maEntry.nCompressedSize : maEntry.nOffset + maEntry.nSize;
|
||||
}
|
||||
|
||||
if (mnZipSize < 0)
|
||||
throw ZipIOException(OUString("The stream seems to be broken!"), uno::Reference< XInterface >());
|
||||
|
||||
sal_Bool bHaveEncryptData = ( rData.is() && rData->m_aSalt.getLength() && rData->m_aInitVector.getLength() && rData->m_nIterationCount != 0 ) ? sal_True : sal_False;
|
||||
sal_Bool bMustDecrypt = ( nStreamMode == UNBUFF_STREAM_DATA && bHaveEncryptData && bIsEncrypted ) ? sal_True : sal_False;
|
||||
|
||||
|
Reference in New Issue
Block a user