From a0628f8a5066cc839fc055f3732e00e9bf01e5a1 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 7 Nov 2022 12:31:18 +0200 Subject: [PATCH] OpenSSL: Remove unused assignment from HPKE expand The length of labeled_info is determined separately, so there is no need to increment the pos pointer after the final entry has been added. Signed-off-by: Jouni Malinen --- src/crypto/crypto_openssl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/crypto/crypto_openssl.c b/src/crypto/crypto_openssl.c index 2c591890a..bee3d4b63 100644 --- a/src/crypto/crypto_openssl.c +++ b/src/crypto/crypto_openssl.c @@ -4856,10 +4856,8 @@ hpke_labeled_expand(struct hpke_context *ctx, bool kem, const u8 *prk, pos += suite_id_len; os_memcpy(pos, label, label_len); pos += label_len; - if (info && info_len) { + if (info && info_len) os_memcpy(pos, info, info_len); - pos += info_len; - } pos = out; #if OPENSSL_VERSION_NUMBER >= 0x30000000L