mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:28:11 +00:00
AK+Everywhere: Don't crash on invalid months
Sadly, we don't have proper error propagation here. However, crashing the Kernel just because a CDROM contains an invalid month seems like a bad idea.
This commit is contained in:
parent
9d40ecacb5
commit
5fafd82927
3 changed files with 13 additions and 37 deletions
|
@ -194,8 +194,6 @@ UnixDateTime ISO9660Inode::parse_numerical_date_time(ISO::NumericalDateAndTime c
|
|||
i32 year_offset = date.years_since_1900 - 70;
|
||||
|
||||
// FIXME: This ignores timezone information in date.
|
||||
// FIXME: This calls `VERIFY(month >= 1 && month <= 12)` (but irritatingly allows days 0 and 255),
|
||||
// which means we can crash the kernel by inserting a CD with an invalid recording month.
|
||||
return UnixDateTime::from_unix_time_parts(year_offset, date.month, date.day, date.hour, date.minute, date.second, 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue