Skip to content

Commit 4dd0341

Browse files
authored
prevent crashing with integeroverflow (#15944)
1 parent 5f59fa1 commit 4dd0341

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Compiler/Driver/fsc.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,8 @@ let main3
908908
use s = ilResource.GetBytes().AsStream()
909909
let sha256 = System.Security.Cryptography.SHA256.Create()
910910
sha256.ComputeHash s)
911-
|> List.sumBy hash
911+
|> List.sumBy (hash >> int64)
912+
|> hash
912913

913914
try
914915
Fsharp.Compiler.SignatureHash.calculateSignatureHashOfFiles typedImplFiles tcGlobals observer

0 commit comments

Comments
 (0)