From f147ff428693f4f034f5f93b95b071ca55526421 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Wed, 6 Mar 2024 20:07:40 +0000 Subject: [PATCH] Poly1305: Fix forgotten variable init git-svn-id: svn://kolibrios.org@9986 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/develop/libraries/libcrash/mac/poly1305.asm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/programs/develop/libraries/libcrash/mac/poly1305.asm b/programs/develop/libraries/libcrash/mac/poly1305.asm index 6ae666fc53..04d3e9313b 100644 --- a/programs/develop/libraries/libcrash/mac/poly1305.asm +++ b/programs/develop/libraries/libcrash/mac/poly1305.asm @@ -42,6 +42,7 @@ assert sizeof.ctx_poly1305 <= LIBCRASH_CTX_LEN proc poly1305.init uses ebx, _ctx, _key, _key_len mov ebx, [_ctx] + mov [ebx+ctx_poly1305.index], 0 mov [ebx+ctx_poly1305.block_size], POLY1305_BLOCK_SIZE mov [ebx+ctx_poly1305.hibit], 1 SHL 24 ; accumulator @@ -385,8 +386,10 @@ proc poly1305.finish uses ebx esi edi, _ctx mov byte[edi], 0x01 inc edi dec ecx + jz @f xor eax, eax rep stosb +@@: mov ebx, [_ctx] mov [ebx+ctx_poly1305.hibit], 0