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:22:50 +0000 |
commit | 9f114219508d64a5b9522006eab1ed2db918dd25 (patch) | |
tree | 9f861c5d7606a01cd6d03b62660685d21f04c2a8 /apps/dgst.c | |
parent | 51527f1e3564f210e984fe5b654c45d34e4f03d7 (diff) | |
download | openssl-new-9f114219508d64a5b9522006eab1ed2db918dd25.tar.gz |
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
Conflicts:
apps/cms.c
apps/s_cb.c
apps/s_server.c
apps/speed.c
crypto/dh/dh_pmeth.c
ssl/s3_pkt.c
Diffstat (limited to 'apps/dgst.c')
-rw-r--r-- | apps/dgst.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/dgst.c b/apps/dgst.c index 6bf77d2ea8..8459c19625 100644 --- a/apps/dgst.c +++ b/apps/dgst.c @@ -448,6 +448,11 @@ int MAIN(int argc, char **argv) ERR_print_errors(bio_err); goto end; } + if (!sigbuf) { + BIO_printf(bio_err, "Out of memory\n"); + ERR_print_errors(bio_err); + goto end; + } siglen = BIO_read(sigbio, sigbuf, siglen); BIO_free(sigbio); if (siglen <= 0) { |