From: Matt Caswell Date: Mon, 14 Jan 2019 11:06:43 +0000 (+0000) Subject: Check a return value in the SRP code X-Git-Tag: openssl-3.0.0-alpha1~2646 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0a5bda639f8fd59e15051cf757708e3b94bcf399;p=oweals%2Fopenssl.git Check a return value in the SRP code Spotted by OSTIF audit Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/8019) --- diff --git a/crypto/srp/srp_vfy.c b/crypto/srp/srp_vfy.c index 4ed94b7fb2..7e32f096d0 100644 --- a/crypto/srp/srp_vfy.c +++ b/crypto/srp/srp_vfy.c @@ -707,6 +707,8 @@ int SRP_create_verifier_BN(const char *user, const char *pass, BIGNUM **salt, } x = SRP_Calc_x(salttmp, user, pass); + if (x == NULL) + goto err; *verifier = BN_new(); if (*verifier == NULL)