From 38bdff0a055ea5529ea3761ce1841c95b3310d54 Mon Sep 17 00:00:00 2001 From: vit9696 <4348897+vit9696@users.noreply.github.com> Date: Sun, 19 Apr 2020 14:43:41 +0300 Subject: [PATCH] OcRtcLib: Fix out of bounds access --- Library/OcRtcLib/AppleRtcRam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/OcRtcLib/AppleRtcRam.c b/Library/OcRtcLib/AppleRtcRam.c index 083403b2..c5916cf2 100644 --- a/Library/OcRtcLib/AppleRtcRam.c +++ b/Library/OcRtcLib/AppleRtcRam.c @@ -332,7 +332,7 @@ OcAppleRtcRamInstallProtocol ( ); if (!EFI_ERROR (Status)) { - for (Index = 0; Index < APPLE_RTC_TOTAL_SIZE; ++Index) { + for (Index = 0; Index < RtcBlacklistSize; ++Index) { mEmulatedRtcStatus[RtcBlacklist[Index]] = TRUE; DEBUG ((DEBUG_INFO, "OCRTC: Blacklisted %02x address\n", RtcBlacklist[Index])); }