From 9e1f123a3a53347740ab1b913de2d524d4fc38b0 Mon Sep 17 00:00:00 2001 From: jji4 Date: Fri, 6 Feb 2009 04:08:16 +0000 Subject: Code level security checked git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7449 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c') diff --git a/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c b/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c index 22ba816a08..5d52071a7b 100644 --- a/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c +++ b/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c @@ -845,7 +845,6 @@ RtcTimeFieldsValid ( Time->Year > 2099 || Time->Month < 1 || Time->Month > 12 || - (!DayValid (Time)) || Time->Hour > 23 || Time->Minute > 59 || Time->Second > 59 || @@ -853,7 +852,9 @@ RtcTimeFieldsValid ( (!(Time->TimeZone == EFI_UNSPECIFIED_TIMEZONE || (Time->TimeZone >= -1440 && Time->TimeZone <= 1440))) || ((Time->Daylight & (~(EFI_TIME_ADJUST_DAYLIGHT | EFI_TIME_IN_DAYLIGHT))) != 0) ) { - return EFI_INVALID_PARAMETER; + if (!DayValid (Time)) { + return EFI_INVALID_PARAMETER; + } } return EFI_SUCCESS; -- cgit v1.2.3