From dd200aa8b3f86f5050599f9b558555574e3128ab Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=9D=B4=ED=98=95=EC=A3=BC/Common=20Platform=20Lab=28SR=29?= =?utf8?q?/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Thu, 11 Aug 2022 17:11:06 +0900 Subject: [PATCH] [Tizen] Null check for MemberLoader::FindMethod (#332) * Null check for MemberLoader::FindMethod * Apply feedback --- src/vm/memberload.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vm/memberload.cpp b/src/vm/memberload.cpp index 4bd663a..7ea1610 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)) -- 2.7.4