COMPRESS-317 ArrayIndexOutOfBoundsException in ZipArchiveEntry#getMergedFields
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/compress/trunk@1684309 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 1d19877..716a110 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -54,8 +54,13 @@
This also changes the superclass of ZCompressorInputStream.
">
+ <action issue="COMPRESS-317" type="fix" date="2015-06-09"
+ due-to="Lucas Werkmeister">
+ ArrayIndexOutOfBoundsException when ZIP extra fields are read
+ and the entry contains an UnparseableExtraField.
+ </action>
<action issue="COMPRESS-316" type="add" date="2015-05-23"
- due-to=""Nick Burch">
+ due-to="Nick Burch">
CompressorStreamFactory can now auto-detect DEFLATE streams
with ZLIB header.
</action>
diff --git a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java
index 6ee9dbb..1eab30c 100644
--- a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java
+++ b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java
@@ -377,7 +377,7 @@
private ZipExtraField[] getMergedFields() {
final ZipExtraField[] zipExtraFields = copyOf(extraFields, extraFields.length + 1);
- zipExtraFields[zipExtraFields.length] = unparseableExtra;
+ zipExtraFields[extraFields.length] = unparseableExtra;
return zipExtraFields;
}