summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormiod <>2014-06-18 04:50:44 +0000
committermiod <>2014-06-18 04:50:44 +0000
commit89ce0e685c59ac4820b7987fc8de49bdc2ecf183 (patch)
treebd4c2fc61a650e082a9b532d62b3a1c639095130 /src
parent20af83337dca6c4b020a11ffff052a56fc8f3f59 (diff)
downloadopenbsd-89ce0e685c59ac4820b7987fc8de49bdc2ecf183.tar.gz
openbsd-89ce0e685c59ac4820b7987fc8de49bdc2ecf183.tar.bz2
openbsd-89ce0e685c59ac4820b7987fc8de49bdc2ecf183.zip
Missinc calloc() return value check; ok deraadt@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libssl/src/ssl/s3_enc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libssl/src/ssl/s3_enc.c b/src/lib/libssl/src/ssl/s3_enc.c
index 6170b553f0..dfb4c283f1 100644
--- a/src/lib/libssl/src/ssl/s3_enc.c
+++ b/src/lib/libssl/src/ssl/s3_enc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s3_enc.c,v 1.49 2014/06/15 15:29:25 jsing Exp $ */ 1/* $OpenBSD: s3_enc.c,v 1.50 2014/06/18 04:50:44 miod Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -608,6 +608,10 @@ ssl3_digest_cached_records(SSL *s)
608 ssl3_free_digest_list(s); 608 ssl3_free_digest_list(s);
609 609
610 s->s3->handshake_dgst = calloc(SSL_MAX_DIGEST, sizeof(EVP_MD_CTX *)); 610 s->s3->handshake_dgst = calloc(SSL_MAX_DIGEST, sizeof(EVP_MD_CTX *));
611 if (s->s3->handshake_dgst == NULL) {
612 SSLerr(SSL_F_SSL3_DIGEST_CACHED_RECORDS, ERR_R_MALLOC_FAILURE);
613 return 0;
614 }
611 hdatalen = BIO_get_mem_data(s->s3->handshake_buffer, &hdata); 615 hdatalen = BIO_get_mem_data(s->s3->handshake_buffer, &hdata);
612 if (hdatalen <= 0) { 616 if (hdatalen <= 0) {
613 SSLerr(SSL_F_SSL3_DIGEST_CACHED_RECORDS, 617 SSLerr(SSL_F_SSL3_DIGEST_CACHED_RECORDS,