Browse Source

COMPRESS-317 ArrayIndexOutOfBoundsException in ZipArchiveEntry#getMergedFields

Too bad this hasn't been found two weeks before.
master
Stefan Bodewig 10 years ago
parent
commit
6e34f177ee
4 changed files with 10 additions and 1 deletions
  1. +1
    -0
      CONTRIBUTORS
  2. +4
    -0
      WHATSNEW
  3. +4
    -0
      contributors.xml
  4. +1
    -1
      src/main/org/apache/tools/zip/ZipEntry.java

+ 1
- 0
CONTRIBUTORS View File

@@ -214,6 +214,7 @@ Larry Streepy
Les Hughes
Levi Cook
lucas
Lucas Werkmeister
Ludovic Claude
Maarten Coene
Magesh Umasankar


+ 4
- 0
WHATSNEW View File

@@ -7,6 +7,10 @@ Changes that could break older environments:
Fixed bugs:
-----------

* ArrayIndexOutOfBoundsException when ZIP extra fields are read and
the entry contains an UnparseableExtraField.
https://issues.apache.org/jira/browse/COMPRESS-317

Other changes:
--------------



+ 4
- 0
contributors.xml View File

@@ -882,6 +882,10 @@
<name>
<last>lucas</last>
</name>
<name>
<first>Lucas</first>
<last>Werkmeister</last>
</name>
<name>
<first>Ludovic</first>
<last>Claude</last>


+ 1
- 1
src/main/org/apache/tools/zip/ZipEntry.java View File

@@ -361,7 +361,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable {
private ZipExtraField[] getMergedFields() {
final ZipExtraField[] zipExtraFields =
copyOf(extraFields, extraFields.length + 1);
zipExtraFields[zipExtraFields.length] = unparseableExtra;
zipExtraFields[extraFields.length] = unparseableExtra;
return zipExtraFields;
}



Loading…
Cancel
Save