diff options
Diffstat (limited to 'thirdparty/openssl/crypto/jpake/jpake.c')
-rw-r--r-- | thirdparty/openssl/crypto/jpake/jpake.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/thirdparty/openssl/crypto/jpake/jpake.c b/thirdparty/openssl/crypto/jpake/jpake.c index ebc0975575..2ba75f0172 100644 --- a/thirdparty/openssl/crypto/jpake/jpake.c +++ b/thirdparty/openssl/crypto/jpake/jpake.c @@ -116,6 +116,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); @@ -151,6 +153,8 @@ static void hashbn(SHA_CTX *sha, const BIGNUM *bn) size_t l = BN_num_bytes(bn); unsigned char *bin = OPENSSL_malloc(l); + if (bin == NULL) + return; hashlength(sha, l); BN_bn2bin(bn, bin); SHA1_Update(sha, bin, l); |