mirror of
https://github.com/corda/corda.git
synced 2025-05-06 02:28:28 +00:00
fix use of uninitalized memory in jnienv.cpp
This commit is contained in:
parent
67300c229a
commit
5d55d61c17
@ -3324,11 +3324,15 @@ JNI_CreateJavaVM(Machine** m, Thread** t, void* args)
|
|||||||
unsigned bootClasspathBufferSize = bcppl + bcpl + bcpal + 3;
|
unsigned bootClasspathBufferSize = bcppl + bcpl + bcpal + 3;
|
||||||
RUNTIME_ARRAY(char, bootClasspathBuffer, bootClasspathBufferSize);
|
RUNTIME_ARRAY(char, bootClasspathBuffer, bootClasspathBufferSize);
|
||||||
char* bootClasspathPointer = RUNTIME_ARRAY_BODY(bootClasspathBuffer);
|
char* bootClasspathPointer = RUNTIME_ARRAY_BODY(bootClasspathBuffer);
|
||||||
|
if (bootClasspathBufferSize > 3) {
|
||||||
local::append(&bootClasspathPointer, bootClasspathPrepend, bcppl,
|
local::append(&bootClasspathPointer, bootClasspathPrepend, bcppl,
|
||||||
bcpl + bcpal ? PATH_SEPARATOR : 0);
|
bcpl + bcpal ? PATH_SEPARATOR : 0);
|
||||||
local::append(&bootClasspathPointer, bootClasspath, bcpl,
|
local::append(&bootClasspathPointer, bootClasspath, bcpl,
|
||||||
bcpal ? PATH_SEPARATOR : 0);
|
bcpal ? PATH_SEPARATOR : 0);
|
||||||
local::append(&bootClasspathPointer, bootClasspathAppend, bcpal, 0);
|
local::append(&bootClasspathPointer, bootClasspathAppend, bcpal, 0);
|
||||||
|
} else {
|
||||||
|
*RUNTIME_ARRAY_BODY(bootClasspathBuffer) = 0;
|
||||||
|
}
|
||||||
|
|
||||||
Finder* bf = makeFinder
|
Finder* bf = makeFinder
|
||||||
(s, h, RUNTIME_ARRAY_BODY(bootClasspathBuffer), bootLibrary);
|
(s, h, RUNTIME_ARRAY_BODY(bootClasspathBuffer), bootLibrary);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user