diff options
author | 이형주/Common Platform Lab(SR)/삼성전자 <leee.lee@samsung.com> | 2022-08-11 17:11:06 +0900 |
---|---|---|
committer | GitHub Enterprise <noreply-CODE@samsung.com> | 2022-08-11 17:11:06 +0900 |
commit | dd200aa8b3f86f5050599f9b558555574e3128ab (patch) | |
tree | 83a799865a81c48c998bb3c8f36d130edb847f47 | |
parent | 42d3181ffecb341a0224abbe0416fc80a965b7ef (diff) | |
download | coreclr-accepted/tizen_6.5_unified.tar.gz coreclr-accepted/tizen_6.5_unified.tar.bz2 coreclr-accepted/tizen_6.5_unified.zip |
[Tizen] Null check for MemberLoader::FindMethod (#332)submit/tizen_6.5/20220811.081453accepted/tizen/6.5/unified/20220812.131039tizen_6.5accepted/tizen_6.5_unified
* Null check for MemberLoader::FindMethod
* Apply feedback
-rw-r--r-- | src/vm/memberload.cpp | 4 |
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)) |