mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-25 16:49:23 +00:00
fix unix range
This commit is contained in:
1 parent
c50d99c5e5
commit
3b95531920
1 file changed
+1
-1
@@ -192,7 +192,7 @@ grub_datetime2unixtime (const struct grub_datetime *datetime, grub_int32_t *nix)
|
||||
31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30};
|
||||
grub_uint8_t months[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
|
||||
|
||||
if (datetime->year > 2038 || datetime->year < 1902)
|
||||
if (datetime->year > 2038 || datetime->year < 1901)
|
||||
return grub_error (GRUB_ERR_OUT_OF_RANGE, "outside of UNIX epoch");
|
||||
if (datetime->month > 12 || datetime->month < 1)
|
||||
return grub_error (GRUB_ERR_BAD_NUMBER, "not a valid month");
|
||||
|
||||
Reference in new issue
Block a user