summaryrefslogtreecommitdiff
path: root/UefiCpuPkg/CpuDxe
diff options
context:
space:
mode:
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2010-03-04 06:38:22 +0000
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2010-03-04 06:38:22 +0000
commit5bdfa4e58ad64cbc825d03397b15f5b2bcebda4e (patch)
tree70596ff95e7b56cf54205c6d138508f7a9a03e2b /UefiCpuPkg/CpuDxe
parent2d5ac154354a192fa40f218a43f766214fdbb311 (diff)
downloadedk2-platforms-5bdfa4e58ad64cbc825d03397b15f5b2bcebda4e.tar.xz
Add array index check to avoid potential buffer overflow.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10179 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UefiCpuPkg/CpuDxe')
-rw-r--r--UefiCpuPkg/CpuDxe/CpuDxe.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c
index e117b9ab56..457823d5cd 100644
--- a/UefiCpuPkg/CpuDxe/CpuDxe.c
+++ b/UefiCpuPkg/CpuDxe/CpuDxe.c
@@ -857,6 +857,7 @@ RefreshGcdMemoryAttributes (
UINT32 FirmwareVariableMtrrCount;
FirmwareVariableMtrrCount = GetFirmwareVariableMtrrCount ();
+ ASSERT (FirmwareVariableMtrrCount <= MTRR_NUMBER_OF_VARIABLE_MTRR);
// mIsFlushingGCD = TRUE;
mIsFlushingGCD = FALSE;