@@ -52,10 +52,14 @@ namespace SMBLibrary
{
return DateTime.FromFileTimeUtc(span);
}
- else
+ else if (span == 0)
return null;
+ else
+ {
+ throw new System.IO.InvalidDataException("FILETIME cannot be negative");
+ }
public static DateTime? ReadNullableFileTime(byte[] buffer, ref int offset)