tdf#168538 package: downgrade assert to SAL_WARN

It is only impossible during normal package parsing because of the added
consistency checks, but the inconsistency can happen during recovery.

Kind of arbitrary which size is used then?

Change-Id: I31ce9ae8b6fe3d1ca50a118ae6c1feaaaffe17ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191455
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
This commit is contained in:
Michael Stahl
2025-09-24 19:47:24 +02:00
parent 01765ffe84
commit 347512a77b
+3 -1
View File
@@ -67,7 +67,9 @@ XUnbufferedStream::XUnbufferedStream(
{
mnZipCurrent = maEntry.nOffset;
sal_Int64 nSize; // data size in the zip file
assert(maEntry.nMethod != STORED || maEntry.nCompressedSize == maEntry.nSize);
// this can actually happen in recovery
SAL_WARN_IF(maEntry.nMethod == STORED && maEntry.nCompressedSize != maEntry.nSize,
"package", "entry STORED with inconsistent size");
if ( mbRawStream )
{
mnZipSize = maEntry.nCompressedSize;