Bug found and fix provided by Earl Hoodmaster
| @@ -109,6 +109,7 @@ Don Brown | |||||
| Don Ferguson | Don Ferguson | ||||
| Don Jeffery | Don Jeffery | ||||
| Drew Sudell | Drew Sudell | ||||
| Earl Hood | |||||
| Edison Guo | Edison Guo | ||||
| Eduard Wirch | Eduard Wirch | ||||
| Edwin Woudt | Edwin Woudt | ||||
| @@ -7,6 +7,11 @@ Changes that could break older environments: | |||||
| Fixed bugs: | Fixed bugs: | ||||
| ----------- | ----------- | ||||
| * ZipOutputStream could cause an ArrayIndexOutOfBoundsException when | |||||
| adding entries with comments. This never happens when using Ant as | |||||
| a build tool but may affect users using Ant's zip package as a | |||||
| library. | |||||
| Other changes: | Other changes: | ||||
| -------------- | -------------- | ||||
| @@ -463,6 +463,10 @@ | |||||
| <first>Drew</first> | <first>Drew</first> | ||||
| <last>Sudell</last> | <last>Sudell</last> | ||||
| </name> | </name> | ||||
| <name> | |||||
| <first>Earl</first> | |||||
| <last>Hood</last> | |||||
| </name> | |||||
| <name> | <name> | ||||
| <first>Edison</first> | <first>Edison</first> | ||||
| <last>Guo</last> | <last>Guo</last> | ||||
| @@ -1258,7 +1258,7 @@ public class ZipOutputStream extends FilterOutputStream { | |||||
| int extraStart = CFH_FILENAME_OFFSET + nameLen; | int extraStart = CFH_FILENAME_OFFSET + nameLen; | ||||
| System.arraycopy(extra, 0, buf, extraStart, extra.length); | System.arraycopy(extra, 0, buf, extraStart, extra.length); | ||||
| int commentStart = extraStart + commentLen; | |||||
| int commentStart = extraStart + extra.length; | |||||
| // file comment | // file comment | ||||
| System.arraycopy(commentB.array(), commentB.arrayOffset(), buf, commentStart, commentLen); | System.arraycopy(commentB.array(), commentB.arrayOffset(), buf, commentStart, commentLen); | ||||