Skip to content

Commit

Permalink
Fix: missing date ticks check when loading osu! database
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotrekol committed Nov 6, 2019
1 parent 90b397f commit 9bdba2e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define GetStarsCombinations
#define GetStarsCombinations
using CollectionManager.DataTypes;
using CollectionManager.Enums;
using CollectionManager.Interfaces;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 9bdba2e

Please sign in to comment.