mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
avoid null pointer deref in Java_java_io_RandomAccessFile_open
This commit is contained in:
parent
ae75be5683
commit
114bf777bb
@ -459,7 +459,7 @@ Java_java_io_RandomAccessFile_open(JNIEnv* e, jclass, jstring path,
|
||||
jlong peer = reinterpret_cast<jlong>(mapping);
|
||||
e->SetLongArrayRegion(result, 0, 1, &peer);
|
||||
|
||||
jlong length = mapping->length;
|
||||
jlong length = (mapping ? mapping->length : 0);
|
||||
e->SetLongArrayRegion(result, 1, 1, &length);
|
||||
|
||||
e->ReleaseStringUTFChars(path, chars);
|
||||
|
Loading…
Reference in New Issue
Block a user