From: Jouni Malinen Date: Mon, 7 Nov 2022 10:31:18 +0000 (+0200) Subject: OpenSSL: Remove unused assignment from HPKE expand X-Git-Tag: hostap_2_11~1548 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0628f8a5066cc839fc055f3732e00e9bf01e5a1;p=thirdparty%2Fhostap.git 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 --- 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