Merge pull request #5503 from peppy/fix-zero-length-hash

Fix zero-length hash models incorrectly creating a unique hash
This commit is contained in:
Dan Balasescu 2019-07-29 17:40:31 +09:00 committed by GitHub
commit 6c3b439b3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -253,7 +253,7 @@ private string computeHash(ArchiveReader reader)
using (Stream s = reader.GetStream(file))
s.CopyTo(hashable);
return hashable.ComputeSHA2Hash();
return hashable.Length > 0 ? hashable.ComputeSHA2Hash() : null;
}
/// <summary>