diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2024-07-09 17:22:15 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2024-07-16 10:27:42 +0200 |
commit | e8049f0b4be2cfda55ff3a97728733a1dcf6691c (patch) | |
tree | 3491822d389c697fcb25670e3afdf6cecc0a8293 /package/inc | |
parent | 3c6dc6b629c51530fb4531e60c0c599128f33c18 (diff) |
package: ZipFile: don't accept duplicate entries (case insensitive)
This is required for OOXML, but not for ODF.
Unclear if there are use cases for this with ODF, can add some
conditions if it turns out to be a problem.
Change-Id: I3810da5c2273574135d133b4a9bbad98dc97af44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170223
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 4833f131243bdb409ddfaff8b4db87d4ed2af98f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170282
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'package/inc')
-rw-r--r-- | package/inc/ZipFile.hxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/package/inc/ZipFile.hxx b/package/inc/ZipFile.hxx index 8bc726af8457..d9910fde92a9 100644 --- a/package/inc/ZipFile.hxx +++ b/package/inc/ZipFile.hxx @@ -29,6 +29,8 @@ #include "HashMaps.hxx" #include "EncryptionData.hxx" +#include <unordered_set> + class MemoryByteGrabber; namespace com::sun::star { namespace uno { class XComponentContext; } @@ -52,6 +54,8 @@ class ZipFile { rtl::Reference<comphelper::RefCountedMutex> m_aMutexHolder; + std::unordered_set<OUString> m_EntriesInsensitive; + EntryHash aEntries; ByteGrabber aGrabber; ZipUtils::Inflater aInflater; |