diff options
author | Jonas Maebe <jonas.maebe@elis.ugent.be> | 2013-12-02 22:04:47 +0100 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2014-12-04 23:48:44 +0100 |
commit | f5905ba341ad0fa3731469f10f7fba6f92ecd787 (patch) | |
tree | 32ffd87e9816995eea001dbb78f604d502efe295 /ssl/ssl_ciph.c | |
parent | b3b966fb878766c67060d384fb4f917ea16269a7 (diff) | |
download | openssl-f5905ba341ad0fa3731469f10f7fba6f92ecd787.tar.gz |
ssl_create_cipher_list: check whether push onto cipherstack succeeds
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl/ssl_ciph.c')
-rw-r--r-- | ssl/ssl_ciph.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c index 464a767efe..a846c75eba 100644 --- a/ssl/ssl_ciph.c +++ b/ssl/ssl_ciph.c @@ -1621,7 +1621,12 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method, if (curr->active) #endif { - sk_SSL_CIPHER_push(cipherstack, curr->cipher); + if (!sk_SSL_CIPHER_push(cipherstack, curr->cipher)) + { + OPENSSL_free(co_list); + sk_SSL_CIPHER_free(cipherstack); + return NULL; + } #ifdef CIPHER_DEBUG printf("<%s>\n",curr->cipher->name); #endif |