package/source/zipapi/XUnbufferedStream.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 347512a77b2e627715e57d5731fe93836d103eb1
Author:     Michael Stahl <[email protected]>
AuthorDate: Wed Sep 24 18:28:25 2025 +0200
Commit:     Michael Stahl <[email protected]>
CommitDate: Wed Sep 24 19:47:24 2025 +0200

    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 <[email protected]>

diff --git a/package/source/zipapi/XUnbufferedStream.cxx 
b/package/source/zipapi/XUnbufferedStream.cxx
index a5161adc36f0..ce58c1584375 100644
--- a/package/source/zipapi/XUnbufferedStream.cxx
+++ b/package/source/zipapi/XUnbufferedStream.cxx
@@ -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;

Reply via email to