From 65374f9681cce269bc2eeede08bd5a6debd887b0 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 15 Jan 2025 04:56:18 -0500 Subject: [PATCH] deps: import torsion. --- deps/torsion/src/hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/torsion/src/hash.c b/deps/torsion/src/hash.c index de49d737..cbe06954 100644 --- a/deps/torsion/src/hash.c +++ b/deps/torsion/src/hash.c @@ -4506,7 +4506,7 @@ hmac_init(hmac_t *hmac, hash_id_t type, const unsigned char *key, size_t len) { for (i = 0; i < len; i++) pad[i] = key[i] ^ 0x36; - for (i = len; i < block_size; i++) + for (i = len; i < sizeof(pad); i++) pad[i] = 0x36; hash_init(&hmac->inner, type); @@ -4515,7 +4515,7 @@ hmac_init(hmac_t *hmac, hash_id_t type, const unsigned char *key, size_t len) { for (i = 0; i < len; i++) pad[i] = key[i] ^ 0x5c; - for (i = len; i < block_size; i++) + for (i = len; i < sizeof(pad); i++) pad[i] = 0x5c; hash_init(&hmac->outer, type);