From dd82f57f46c3a2444abc6492488f89b2c3d6f37f Mon Sep 17 00:00:00 2001 From: tb Date: Tue, 9 Jul 2024 17:01:40 +0000 Subject: [PATCH] Make a NULL check explicit --- lib/libcrypto/kdf/tls1_prf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libcrypto/kdf/tls1_prf.c b/lib/libcrypto/kdf/tls1_prf.c index 1ba1e363f71..cefb3e2cad0 100644 --- a/lib/libcrypto/kdf/tls1_prf.c +++ b/lib/libcrypto/kdf/tls1_prf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls1_prf.c,v 1.29 2024/07/09 17:00:59 tb Exp $ */ +/* $OpenBSD: tls1_prf.c,v 1.30 2024/07/09 17:01:40 tb Exp $ */ /* * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project * 2016. @@ -291,7 +291,7 @@ tls1_prf_P_hash(const EVP_MD *md, goto err; if (out_len > (size_t)chunk && !EVP_MD_CTX_copy_ex(ctx_tmp, ctx)) goto err; - if (seed && !EVP_DigestSignUpdate(ctx, seed, seed_len)) + if (seed != NULL && !EVP_DigestSignUpdate(ctx, seed, seed_len)) goto err; if (out_len > (size_t)chunk) { -- 2.20.1