Merge pull request #3436 from haydenroche5/chacha_msvc_fix

Fix MSVC compile issue in chacha.c.
This commit is contained in:
toddouska
2020-11-03 14:44:43 -08:00
committed by GitHub

View File

@@ -442,7 +442,8 @@ int wc_Chacha_Process(ChaCha* ctx, byte* output, const byte* input,
void wc_Chacha_purge_current_block(ChaCha* ctx) {
if (ctx->left > 0) {
byte scratch[CHACHA_CHUNK_BYTES] = {};
byte scratch[CHACHA_CHUNK_BYTES];
XMEMSET(scratch, 0, sizeof(scratch));
(void)wc_Chacha_Process(ctx, scratch, scratch, CHACHA_CHUNK_BYTES - ctx->left);
}
}