Update ArchiveReader.cs (#303)

#227
Added check if argument is in range in method TranslateTime(long? time)
This commit is contained in:
Thritton
2017-09-19 16:25:10 +02:00
committed by Adam Hathcock
parent 7064cda6de
commit bb59f28b22

View File

@@ -182,7 +182,7 @@ namespace SharpCompress.Common.SevenZip
private DateTime? TranslateTime(long? time)
{
if (time.HasValue)
if (time.HasValue && time.Value >= 0 && time.Value <= 2650467743999999999) //maximum Windows file time 31.12.9999
{
return TranslateTime(time.Value);
}
@@ -1588,4 +1588,4 @@ namespace SharpCompress.Common.SevenZip
#endregion
}
}
}