Skip to content

Commit 9764704

Browse files
Temtaimedlang-bot
authored andcommitted
Fix hang with buffer > 4gb
1 parent d3c2be9 commit 9764704

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

std/digest/sha.d

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,9 @@ struct SHA(uint hashBlockSize, uint digestSize)
650650
void put(scope const(ubyte)[] input...) @trusted pure nothrow @nogc
651651
{
652652
enum blockSizeInBytes = blockSize/8;
653-
uint i, index, partLen;
653+
654+
size_t i;
655+
uint index, partLen;
654656
auto inputLen = input.length;
655657

656658
/* Compute number of bytes mod block size (64 or 128 bytes) */

0 commit comments

Comments
 (0)