mirror of
https://github.com/corda/corda.git
synced 2025-06-11 03:41:41 +00:00
Merge pull request #477 from dicej/getEntryBytes
do not null-terminate ZipEntry names in openjdk-src builds
This commit is contained in:
commit
cbfce38aa1
@ -1658,9 +1658,8 @@ int64_t JNICALL
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case 0: { // name
|
case 0: { // name
|
||||||
unsigned nameLength = fileNameLength(entry->start);
|
unsigned nameLength = fileNameLength(entry->start);
|
||||||
GcByteArray* array = makeByteArray(t, nameLength + 1);
|
GcByteArray* array = makeByteArray(t, nameLength);
|
||||||
memcpy(array->body().begin(), fileName(entry->start), nameLength);
|
memcpy(array->body().begin(), fileName(entry->start), nameLength);
|
||||||
array->body()[nameLength] = 0;
|
|
||||||
return reinterpret_cast<int64_t>(array);
|
return reinterpret_cast<int64_t>(array);
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user