aboutsummaryrefslogtreecommitdiff
path: root/crypto/jpake/jpake.c
diff options
context:
space:
mode:
authorJonas Maebe <jonas.maebe@elis.ugent.be>2013-12-08 18:14:10 +0100
committerKurt Roeckx <kurt@roeckx.be>2014-08-17 18:54:11 +0200
commit462319c3e9e3d205fba795dbd63936a8547a6100 (patch)
tree93da2963ca514cc7490b749ba2be349d74ed699b /crypto/jpake/jpake.c
parent34374c2d2c94435a96d98b6527d04417849c0971 (diff)
downloadopenssl-462319c3e9e3d205fba795dbd63936a8547a6100.zip
openssl-462319c3e9e3d205fba795dbd63936a8547a6100.tar.gz
openssl-462319c3e9e3d205fba795dbd63936a8547a6100.tar.bz2
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>
Diffstat (limited to 'crypto/jpake/jpake.c')
-rw-r--r--crypto/jpake/jpake.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/jpake/jpake.c b/crypto/jpake/jpake.c
index 8e4b633..4249294 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);