wc_Chacha_purge_current_block(): init "scratch" buffer to zeros, to avoid "garbage value" warnings.

This commit is contained in:
Daniel Pouzzner
2020-10-01 14:02:22 -05:00
parent f65947ae09
commit 1949378d61

View File

@@ -431,7 +431,7 @@ 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] = {};
(void)wc_Chacha_Process(ctx, scratch, scratch, CHACHA_CHUNK_BYTES - ctx->left);
}
}