This is an automated email from the ASF dual-hosted git repository.

ardovm pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
     new e8b69c8c40 Fix check for enough bytes remaining
e8b69c8c40 is described below

commit e8b69c8c40ed70ab02f2db79c62a8803ffec612a
Author: Arrigo Marchiori <[email protected]>
AuthorDate: Sun Jul 5 15:17:54 2026 +0200

    Fix check for enough bytes remaining
    
    Issue found by Damjan Jovanovic. Thank you!
---
 main/package/source/package/zipapi/ZipFile.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main/package/source/package/zipapi/ZipFile.cxx 
b/main/package/source/package/zipapi/ZipFile.cxx
index 3c40b92ce6..2cf4ccb5f6 100644
--- a/main/package/source/package/zipapi/ZipFile.cxx
+++ b/main/package/source/package/zipapi/ZipFile.cxx
@@ -659,7 +659,7 @@ static void readExtraFields( MemoryByteGrabber 
&rMemGrabber, sal_Int16 nLength,
        sal_Int16 nReadBytes = 0;
        sal_Int8 n8;
        rtl::OUString s;
-       while ( ( nLength - nReadBytes ) >= 2 ) {
+       while ( ( nLength - nReadBytes ) >= 4 ) {
                rMemGrabber >> nHeaderID;
                rMemGrabber >> nDataSize;
                nReadBytes += 4;

Reply via email to