MdeModulePkg/EbcDebugger: Add check for Entry and RetEntry
Entry and RetEntry might be NULL before used. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
parent
0c1541d457
commit
a7d69b6aaf
|
@ -143,7 +143,7 @@ DebuggerDisplaySymbolAccrodingToAddress (
|
||||||
// Find the nearest symbol address
|
// Find the nearest symbol address
|
||||||
//
|
//
|
||||||
CandidateAddress = EbdFindSymbolAddress (Address, EdbMatchSymbolTypeNearestAddress, &Object, &Entry);
|
CandidateAddress = EbdFindSymbolAddress (Address, EdbMatchSymbolTypeNearestAddress, &Object, &Entry);
|
||||||
if (CandidateAddress == 0 || CandidateAddress == (UINTN) -1) {
|
if (CandidateAddress == 0 || CandidateAddress == (UINTN) -1 || Entry == NULL) {
|
||||||
EDBPrint (L"Symbole at Address not found!\n");
|
EDBPrint (L"Symbole at Address not found!\n");
|
||||||
return EFI_DEBUG_CONTINUE;
|
return EFI_DEBUG_CONTINUE;
|
||||||
} else if (Address != CandidateAddress) {
|
} else if (Address != CandidateAddress) {
|
||||||
|
|
|
@ -2062,7 +2062,7 @@ EdbPrintSource (
|
||||||
&RetObject,
|
&RetObject,
|
||||||
&RetEntry
|
&RetEntry
|
||||||
);
|
);
|
||||||
if (SymbolAddress == 0) {
|
if (SymbolAddress == 0 || RetEntry == NULL) {
|
||||||
return 0 ;
|
return 0 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue