]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
OpenSSL: Remove unused assignment from HPKE expand
authorJouni Malinen <quic_jouni@quicinc.com>
Mon, 7 Nov 2022 10:31:18 +0000 (12:31 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 7 Nov 2022 12:02:55 +0000 (14:02 +0200)
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 <quic_jouni@quicinc.com>
src/crypto/crypto_openssl.c

index 2c591890a04eee894c505f058287241b9ec49b6c..bee3d4b6379bffa8126e85308445ac6589a68b56 100644 (file)
@@ -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