From e459d2a8637884bdee4ac42e83faee84125f2315 Mon Sep 17 00:00:00 2001 From: hseigel Date: Mon, 7 Apr 2014 09:27:31 -0400 Subject: [PATCH] 8037157: Verify call Summary: Check for null method Reviewed-by: coleenp, acorn, mschoene --- src/share/vm/classfile/verifier.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/share/vm/classfile/verifier.cpp b/src/share/vm/classfile/verifier.cpp index d61a4c3c0..9d9420889 100644 --- a/src/share/vm/classfile/verifier.cpp +++ b/src/share/vm/classfile/verifier.cpp @@ -2307,6 +2307,11 @@ void ClassVerifier::verify_invoke_init( Method* m = InstanceKlass::cast(ref_klass)->uncached_lookup_method( vmSymbols::object_initializer_name(), cp->signature_ref_at(bcs->get_index_u2())); + if (m == NULL) { + verify_error(ErrorContext::bad_code(bci), + "Call to missing method"); + return; + } instanceKlassHandle mh(THREAD, m->method_holder()); if (m->is_protected() && !mh->is_same_class_package(_klass())) { bool assignable = current_type().is_assignable_from( -- GitLab