Fix overflow on some platforms

This commit is contained in:
Jordan Bancino 2022-12-19 22:25:49 +00:00
parent b8027e1aaf
commit 72bfa34bcd

View file

@ -187,7 +187,7 @@ Sha256(char *str)
unsigned char out[32];
char *outStr;
char fill[64];
unsigned char fill[64];
uint32_t fillLen;
unsigned char buf[8];
uint32_t hiLen;
@ -229,7 +229,7 @@ Sha256(char *str)
PUT_UINT32(&buf[0], hiLen);
PUT_UINT32(&buf[4], loLen);
Sha256Process(&context, (unsigned char *) fill, fillLen);
Sha256Process(&context, fill, fillLen);
Sha256Process(&context, buf, 8);
for (i = 0; i < 8; i++)