mirror of
https://github.com/corda/corda.git
synced 2025-01-05 20:54:13 +00:00
terminate zero-length char array with null char in stringUTFChars
This commit is contained in:
parent
ebd7f69c41
commit
248ff91d74
@ -3667,7 +3667,6 @@ stringUTFChars(Thread* t, object string, unsigned start, unsigned length,
|
||||
assert(t, static_cast<unsigned>
|
||||
(stringUTFLength(t, string, start, length)) == charsLength);
|
||||
|
||||
if (length) {
|
||||
object data = stringData(t, string);
|
||||
if (objectClass(t, data) == type(t, Machine::ByteArrayType)) {
|
||||
memcpy(chars,
|
||||
@ -3694,7 +3693,6 @@ stringUTFChars(Thread* t, object string, unsigned start, unsigned length,
|
||||
}
|
||||
chars[j] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint64_t
|
||||
|
Loading…
Reference in New Issue
Block a user