diff options
author | Matt Caswell <matt@openssl.org> | 2015-03-04 17:49:51 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-03-05 09:15:08 +0000 |
commit | d6b4a41d100c2d3b401baf8edc34085ff610c5ba (patch) | |
tree | 8218609640b11832193a700d07a139f4246d8ecd /apps/s_cb.c | |
parent | 9fdbaf3a322689a58381c724e4f3497320a69581 (diff) |
Unchecked malloc fixes
Miscellaneous unchecked malloc fixes. Also fixed some mem leaks on error
paths as I spotted them along the way.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 918bb8652969fd53f0c390c1cd909265ed502c7e)
Conflicts:
crypto/bio/bss_dgram.c
Diffstat (limited to 'apps/s_cb.c')
-rw-r--r-- | apps/s_cb.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/s_cb.c b/apps/s_cb.c index d5756c0ffe..f6e6bcd765 100644 --- a/apps/s_cb.c +++ b/apps/s_cb.c @@ -456,8 +456,13 @@ int ssl_print_curves(BIO *out, SSL *s, int noshared) if (ncurves <= 0) return 1; curves = OPENSSL_malloc(ncurves * sizeof(int)); + if(!curves) { + BIO_puts(out, "Malloc error getting supported curves\n"); + return 0; + } SSL_get1_curves(s, curves); + BIO_puts(out, "Supported Elliptic Curves: "); for (i = 0; i < ncurves; i++) { if (i) |