diff options
author | jji4 <jji4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-06 04:08:16 +0000 |
---|---|---|
committer | jji4 <jji4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-06 04:08:16 +0000 |
commit | 9e1f123a3a53347740ab1b913de2d524d4fc38b0 (patch) | |
tree | ff448f797fb02ae67d41c33bcdce1ce3270f19ba | |
parent | 311a71b2998b6f8c35c09c7a59a3d589dfa1c1e0 (diff) | |
download | edk2-platforms-9e1f123a3a53347740ab1b913de2d524d4fc38b0.tar.xz |
Code level security checked
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7449 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c | 5 |
1 files changed, 3 insertions, 2 deletions
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;
|