mirror of https://github.com/acidanthera/audk.git
Fix potential NULL pointer dereference issue in TcgDxe & TreeDxe.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16494 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
213cc1000e
commit
61959fa9ba
|
@ -1021,7 +1021,7 @@ MeasureAllBootVariables (
|
|||
&BootCount,
|
||||
(VOID **) &BootOrder
|
||||
);
|
||||
if (Status == EFI_NOT_FOUND) {
|
||||
if (Status == EFI_NOT_FOUND || BootOrder == NULL) {
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -1245,7 +1245,7 @@ MeasureVariable (
|
|||
VarName,
|
||||
VarNameLength * sizeof (*VarName)
|
||||
);
|
||||
if (VarSize != 0) {
|
||||
if (VarSize != 0 && VarData != NULL) {
|
||||
CopyMem (
|
||||
(CHAR16 *)VarLog->UnicodeName + VarNameLength,
|
||||
VarData,
|
||||
|
@ -1423,7 +1423,7 @@ MeasureAllBootVariables (
|
|||
&BootCount,
|
||||
(VOID **) &BootOrder
|
||||
);
|
||||
if (Status == EFI_NOT_FOUND) {
|
||||
if (Status == EFI_NOT_FOUND || BootOrder == NULL) {
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue