From 79864f54ce932a75c35acfdbb63a7c01b7650a6e Mon Sep 17 00:00:00 2001 From: jji4 Date: Tue, 20 Jan 2009 04:17:05 +0000 Subject: [PATCH] Source level security checked git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7316 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c b/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c index 6f875744ba..22ba816a08 100644 --- a/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c +++ b/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c @@ -593,6 +593,10 @@ PcRtcSetWakeupTime ( // Just support set alarm time within 24 hours // PcRtcGetTime (&RtcTime, &Capabilities, Global); + Status = RtcTimeFieldsValid (&RtcTime); + if (EFI_ERROR (Status)) { + return EFI_DEVICE_ERROR; + } if (!IsWithinOneDay (&RtcTime, Time)) { return EFI_UNSUPPORTED; }