summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author이형주/Common Platform Lab(SR)/삼성전자 <leee.lee@samsung.com>2022-08-11 17:11:06 +0900
committerGitHub Enterprise <noreply-CODE@samsung.com>2022-08-11 17:11:06 +0900
commitdd200aa8b3f86f5050599f9b558555574e3128ab (patch)
tree83a799865a81c48c998bb3c8f36d130edb847f47
parent42d3181ffecb341a0224abbe0416fc80a965b7ef (diff)
downloadcoreclr-accepted/tizen_6.5_unified.tar.gz
coreclr-accepted/tizen_6.5_unified.tar.bz2
coreclr-accepted/tizen_6.5_unified.zip
* Null check for MemberLoader::FindMethod * Apply feedback
-rw-r--r--src/vm/memberload.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vm/memberload.cpp b/src/vm/memberload.cpp
index 4bd663a47b..7ea16108e4 100644
--- a/src/vm/memberload.cpp
+++ b/src/vm/memberload.cpp
@@ -1103,6 +1103,7 @@ MemberLoader::FindMethod(
for (; it.IsValid(); it.Prev())
{
MethodDesc *pCurDeclMD = it.GetDeclMethodDesc();
+ LPCUTF8 pCurDeclMDName = NULL;
#ifdef _DEBUG
MethodTable *pCurDeclMT = pCurDeclMD->GetMethodTable();
CONSISTENCY_CHECK(!pMT->IsInterface() || pCurDeclMT == pMT->GetCanonicalMethodTable());
@@ -1117,7 +1118,8 @@ MemberLoader::FindMethod(
||
(pCurDeclMD->MightHaveName(targetNameHash)
// This is done last since it is the most expensive of the IF statement.
- && StrCompFunc(pszName, pCurDeclMD->GetName()) == 0)
+ && (pCurDeclMDName = pCurDeclMD->GetName()) != NULL
+ && StrCompFunc(pszName, pCurDeclMDName) == 0)
)
{
if (CompareMethodSigWithCorrectSubstitution(pSignature, cSignature, pModule, pCurDeclMD, pDefSubst, pMT))