mirror of
https://github.com/tianocore/edk2
synced 2026-08-27 00:23:19 -04:00
SecurityPkg/SecTpmMeasurementLib: Fix OverFlow Coverity issue
CC_MR_INDEX_0_MRTD indicates the MRTD register. This register is NOT extendable in TDVF. So the return value of TdxMeasurementMapPcrToMrIndex must be checked. Cc: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
This commit is contained in:
parent
d49364779c
commit
7c40bc06a9
1 changed files with 2 additions and 1 deletions
|
|
@ -58,7 +58,8 @@ TdxHashLogExtendEvent (
|
|||
}
|
||||
|
||||
MrIndex = TdxMeasurementMapPcrToMrIndex (PcrIndex);
|
||||
if (MrIndex == CC_MR_INDEX_INVALID) {
|
||||
// MRTD is NOT extendable in TDVF.
|
||||
if ((MrIndex == CC_MR_INDEX_INVALID) || (MrIndex == CC_MR_INDEX_0_MRTD)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue