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

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


The following commit(s) were added to refs/heads/AOO41X by this push:
     new 8c6d07a40a More checks
8c6d07a40a is described below

commit 8c6d07a40a90062c08859c826056a8cd25afdcfe
Author: Arrigo Marchiori <[email protected]>
AuthorDate: Tue Sep 15 21:40:39 2026 +0200

    More checks
    
    (cherry picked from commit 66ab9c1188ef75c84225c856a87bc93d575247ca)
---
 main/package/source/zipapi/ZipFile.cxx | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/main/package/source/zipapi/ZipFile.cxx 
b/main/package/source/zipapi/ZipFile.cxx
index 7c6ececd6e..7d96a4b612 100644
--- a/main/package/source/zipapi/ZipFile.cxx
+++ b/main/package/source/zipapi/ZipFile.cxx
@@ -668,6 +668,8 @@ static void readExtraFields( MemoryByteGrabber 
&rMemGrabber, sal_Int16 nLength,
                        throw ZipException( OUString( 
RTL_CONSTASCII_USTRINGPARAM ( "Invalid ZIP extra fields" ) ), uno::Reference < 
XInterface > () );
                switch ( nHeaderID ) {
                case 0x7075: // Info-ZIP Unicode Path Extra Field
+                       if ( nDataSize < 5 )
+                               throw ZipException( OUString( 
RTL_CONSTASCII_USTRINGPARAM ( "Invalid size for ZIP unicode path extra field" ) 
), uno::Reference < XInterface > () );
                        rMemGrabber >> n8; // Version
                        rMemGrabber.skipBytes( 4 ); // skip NameCRC32
                        s = rtl::OUString::intern ( (sal_Char *) 
rMemGrabber.getCurrentPos(),

Reply via email to