From 07de078a3b5b7b0043d9f81bb5a9e750a3a0c7c1 Mon Sep 17 00:00:00 2001 From: vnugent Date: Fri, 26 Jul 2024 23:37:15 -0400 Subject: refactor: Span invasion, checks and fix some evp api --- src/hkdf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/hkdf.c') diff --git a/src/hkdf.c b/src/hkdf.c index 16e0b5b..7b0b822 100644 --- a/src/hkdf.c +++ b/src/hkdf.c @@ -95,7 +95,7 @@ cstatus_t hkdfExpandProcess( } /* tlen becomes the hash size or remaining okm size */ - tLen = HKDF_MIN(okm.size - okmOffset, SHA256_DIGEST_SIZE); + tLen = HKDF_MIN(ncSpanGetSize(okm) - okmOffset, SHA256_DIGEST_SIZE); DEBUG_ASSERT(tLen <= sizeof(t)); -- cgit