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 2d8042e0da Fix check for enough bytes remaining
2d8042e0da is described below
commit 2d8042e0da82633443766c3640d39dc461b3207d
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!
(cherry picked from commit e8b69c8c40ed70ab02f2db79c62a8803ffec612a)
---
main/package/source/zipapi/ZipFile.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/main/package/source/zipapi/ZipFile.cxx
b/main/package/source/zipapi/ZipFile.cxx
index dace910312..7c6ececd6e 100644
--- a/main/package/source/zipapi/ZipFile.cxx
+++ b/main/package/source/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;