mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
do not null-terminate ZipEntry names in openjdk-src builds
OpenJDK's java.util.zip.ZipFile.getEntryBytes should return a byte array that is not null-terminated, but we were giving it one that was null-terminated, which caused lookups to fail later when ZipFile.getInputStream was called.
This commit is contained in:
parent
3b83277d5e
commit
2bb3ea2532
@ -1658,9 +1658,8 @@ int64_t JNICALL
|
||||
switch (type) {
|
||||
case 0: { // name
|
||||
unsigned nameLength = fileNameLength(entry->start);
|
||||
GcByteArray* array = makeByteArray(t, nameLength + 1);
|
||||
GcByteArray* array = makeByteArray(t, nameLength);
|
||||
memcpy(array->body().begin(), fileName(entry->start), nameLength);
|
||||
array->body()[nameLength] = 0;
|
||||
return reinterpret_cast<int64_t>(array);
|
||||
} break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user