mirror of
https://github.com/corda/corda.git
synced 2025-02-07 19:40:25 +00:00
cp/avian/java-net.cpp: fix segfault
In Java_java_net_InetAddress_ipv4AddressForName: Throw nullptrex on hostname = null.
This commit is contained in:
parent
e7e54ad52b
commit
a820370cb2
@ -97,6 +97,11 @@ extern "C" JNIEXPORT jint JNICALL
|
|||||||
jclass,
|
jclass,
|
||||||
jstring name)
|
jstring name)
|
||||||
{
|
{
|
||||||
|
if(!name) {
|
||||||
|
throwNew(e, "java/lang/NullPointerException", 0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
const char* chars = e->GetStringUTFChars(name, 0);
|
const char* chars = e->GetStringUTFChars(name, 0);
|
||||||
if (chars) {
|
if (chars) {
|
||||||
#ifdef PLATFORM_WINDOWS
|
#ifdef PLATFORM_WINDOWS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user