From: tb Date: Sat, 1 Jul 2023 14:53:48 +0000 (+0000) Subject: Add a missing NULL check for group X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8d821aeb0b31857396eab6f8e57967ea183aa681;p=openbsd Add a missing NULL check for group ok jsing --- diff --git a/lib/libcrypto/ecdh/ech_key.c b/lib/libcrypto/ecdh/ech_key.c index f0c760b8da5..fc023af986f 100644 --- a/lib/libcrypto/ecdh/ech_key.c +++ b/lib/libcrypto/ecdh/ech_key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ech_key.c,v 1.23 2023/07/01 14:52:34 tb Exp $ */ +/* $OpenBSD: ech_key.c,v 1.24 2023/07/01 14:53:48 tb Exp $ */ /* ==================================================================== * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. * @@ -121,7 +121,8 @@ ossl_ecdh_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, goto err; } - group = EC_KEY_get0_group(ecdh); + if ((group = EC_KEY_get0_group(ecdh)) == NULL) + goto err; if (!EC_POINT_is_on_curve(group, pub_key, ctx)) goto err;