Fixed zeroise SHA_CTX struct, not pointer size (maybe CWE Information Disclosure if size pointer less struct size)

This commit is contained in:
Herman Semenov 2024-04-01 16:24:14 +03:00
parent 83bd9fd665
commit 24ccd898fe

View File

@ -356,7 +356,7 @@ void SHAFinal(BYTE *output, SHA_CTX *shsInfo)
SHAtoByte(output, shsInfo->digest, SHS_DIGESTSIZE);
/* Zeroise sensitive stuff */
memset((POINTER)shsInfo, 0, sizeof(shsInfo));
memset((POINTER)shsInfo, 0, sizeof(*shsInfo));
}
static void SHAtoByte(BYTE *output, UINT4 *input, unsigned int len)