summaryrefslogtreecommitdiff
path: root/src/lib/libssl/s3_clnt.c
diff options
context:
space:
mode:
authorjsing <>2015-06-24 09:44:18 +0000
committerjsing <>2015-06-24 09:44:18 +0000
commit16ca3547d4f9c881bccdddd888c3f49a5aae08ef (patch)
tree72e5254ff38d73062fe12c7c5d5c7aed2cbd26a6 /src/lib/libssl/s3_clnt.c
parenta3cc0750bdef82e86f45118e2b5188160125f56c (diff)
downloadopenbsd-16ca3547d4f9c881bccdddd888c3f49a5aae08ef.tar.gz
openbsd-16ca3547d4f9c881bccdddd888c3f49a5aae08ef.tar.bz2
openbsd-16ca3547d4f9c881bccdddd888c3f49a5aae08ef.zip
Stop using BUF_memdup() within the LibreSSL code base - it is correctly
spelt malloc+memcpy, which is what is used in all except two places. ok deraadt@ doug@
Diffstat (limited to 'src/lib/libssl/s3_clnt.c')
-rw-r--r--src/lib/libssl/s3_clnt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libssl/s3_clnt.c b/src/lib/libssl/s3_clnt.c
index 0ef17d0067..cf8b2ec41d 100644
--- a/src/lib/libssl/s3_clnt.c
+++ b/src/lib/libssl/s3_clnt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s3_clnt.c,v 1.113 2015/06/20 18:19:56 doug Exp $ */ 1/* $OpenBSD: s3_clnt.c,v 1.114 2015/06/24 09:44:18 jsing 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 *
@@ -1815,13 +1815,13 @@ ssl3_get_cert_status(SSL *s)
1815 goto f_err; 1815 goto f_err;
1816 } 1816 }
1817 free(s->tlsext_ocsp_resp); 1817 free(s->tlsext_ocsp_resp);
1818 s->tlsext_ocsp_resp = BUF_memdup(p, resplen); 1818 if ((s->tlsext_ocsp_resp = malloc(resplen)) == NULL) {
1819 if (!s->tlsext_ocsp_resp) {
1820 al = SSL_AD_INTERNAL_ERROR; 1819 al = SSL_AD_INTERNAL_ERROR;
1821 SSLerr(SSL_F_SSL3_GET_CERT_STATUS, 1820 SSLerr(SSL_F_SSL3_GET_CERT_STATUS,
1822 ERR_R_MALLOC_FAILURE); 1821 ERR_R_MALLOC_FAILURE);
1823 goto f_err; 1822 goto f_err;
1824 } 1823 }
1824 memcpy(s->tlsext_ocsp_resp, p, resplen);
1825 s->tlsext_ocsp_resplen = resplen; 1825 s->tlsext_ocsp_resplen = resplen;
1826 if (s->ctx->tlsext_status_cb) { 1826 if (s->ctx->tlsext_status_cb) {
1827 int ret; 1827 int ret;