diff options
author | Jonas Maebe <jonas.maebe@elis.ugent.be> | 2013-12-08 18:14:10 +0100 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2014-08-17 18:54:11 +0200 |
commit | 462319c3e9e3d205fba795dbd63936a8547a6100 (patch) | |
tree | 93da2963ca514cc7490b749ba2be349d74ed699b | |
parent | 34374c2d2c94435a96d98b6527d04417849c0971 (diff) |
JPAKE_CTX_new: check for NULL result when allocating ctx
Signed-off-by: Kurt Roeckx <kurt@openssl.org>
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
-rw-r--r-- | crypto/jpake/jpake.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/jpake/jpake.c b/crypto/jpake/jpake.c index 8e4b633ccc..424929471f 100644 --- a/crypto/jpake/jpake.c +++ b/crypto/jpake/jpake.c @@ -117,6 +117,8 @@ JPAKE_CTX *JPAKE_CTX_new(const char *name, const char *peer_name, const BIGNUM *secret) { JPAKE_CTX *ctx = OPENSSL_malloc(sizeof *ctx); + if (ctx == NULL) + return NULL; JPAKE_CTX_init(ctx, name, peer_name, p, g, q, secret); |