From 9bdba2ee229c4b48eefbf8285c667dffdb051735 Mon Sep 17 00:00:00 2001 From: Piotrekol Date: Wed, 6 Nov 2019 16:27:45 +0100 Subject: [PATCH] Fix: missing date ticks check when loading osu! database --- .../Modules/FileIO/OsuDb/OsuDatabaseReader.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CollectionManagerDll/Modules/FileIO/OsuDb/OsuDatabaseReader.cs b/CollectionManagerDll/Modules/FileIO/OsuDb/OsuDatabaseReader.cs index f36c5c7..07feb09 100644 --- a/CollectionManagerDll/Modules/FileIO/OsuDb/OsuDatabaseReader.cs +++ b/CollectionManagerDll/Modules/FileIO/OsuDb/OsuDatabaseReader.cs @@ -1,4 +1,4 @@ -#define GetStarsCombinations +#define GetStarsCombinations using CollectionManager.DataTypes; using CollectionManager.Enums; using CollectionManager.Interfaces; @@ -333,7 +333,7 @@ private object ConditionalRead() private DateTime GetDate() { long ticks = _binaryReader.ReadInt64(); - if (ticks < 0L) + if (ticks < 0L || ticks > DateTime.MaxValue.Ticks || ticks < DateTime.MinValue.Ticks) { return DateTime.MinValue; }