Skip to content

Commit 5dfb42f

Browse files
author
David Holmes
committed
8255563: Missing NULL checks after JDK-8233624
Reviewed-by: kvn
1 parent e730e8b commit 5dfb42f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/hotspot/share/jvmci/jvmciCompilerToVM.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2295,6 +2295,7 @@ C2V_VMENTRY_NULL(jlongArray, registerNativeMethods, (JNIEnv* env, jobject, jclas
22952295
// 1) Try JNI short style
22962296
stringStream st;
22972297
char* pure_name = NativeLookup::pure_jni_name(method);
2298+
guarantee(pure_name != NULL, "Illegal native method name encountered");
22982299
os::print_jni_name_prefix_on(&st, args_size);
22992300
st.print_raw(pure_name);
23002301
os::print_jni_name_suffix_on(&st, args_size);
@@ -2305,6 +2306,7 @@ C2V_VMENTRY_NULL(jlongArray, registerNativeMethods, (JNIEnv* env, jobject, jclas
23052306
// 2) Try JNI long style
23062307
st.reset();
23072308
char* long_name = NativeLookup::long_jni_name(method);
2309+
guarantee(long_name != NULL, "Illegal native method name encountered");
23082310
os::print_jni_name_prefix_on(&st, args_size);
23092311
st.print_raw(pure_name);
23102312
st.print_raw(long_name);

0 commit comments

Comments
 (0)