summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/vm/ceeload.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vm/ceeload.cpp b/src/vm/ceeload.cpp
index 6d1643b46e..cd46cffaaa 100644
--- a/src/vm/ceeload.cpp
+++ b/src/vm/ceeload.cpp
@@ -7442,6 +7442,11 @@ MethodDesc* Module::LoadIBCMethodHelper(DataImage *image, CORBBTPROF_BLOB_PARAM_
DWORD slot;
IfFailThrow(p.GetData(&slot));
+ if (slot >= pOwnerMT->GetNumVtableSlots())
+ {
+ COMPlusThrow(kTypeLoadException, IDS_IBC_MISSING_EXTERNAL_METHOD);
+ }
+
pMethod = pOwnerMT->GetMethodDescForSlot(slot);
}
else // otherwise we use the normal metadata MethodDef token encoding and we handle ibc tokens.