summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src/ssl
diff options
context:
space:
mode:
authorbeck <beck@openbsd.org>2014-07-13 16:03:09 +0000
committerbeck <beck@openbsd.org>2014-07-13 16:03:09 +0000
commit74a2cbdcfd19dacf51a0f171d05707c1b7276d9b (patch)
tree15e1064adfbd3cb00711a975bdf6d5db4ddb1889 /lib/libssl/src/ssl
parenttedu setlist support, superseded by the new locate dbs. (diff)
downloadwireguard-openbsd-74a2cbdcfd19dacf51a0f171d05707c1b7276d9b.tar.xz
wireguard-openbsd-74a2cbdcfd19dacf51a0f171d05707c1b7276d9b.zip
The bell tolls for BUF_strdup - Start the migration to using
intrinsics. This is the easy ones, a few left to check one at a time. ok miod@ deraadt@
Diffstat (limited to 'lib/libssl/src/ssl')
-rw-r--r--lib/libssl/src/ssl/s3_lib.c4
-rw-r--r--lib/libssl/src/ssl/ssl_sess.c4
-rw-r--r--lib/libssl/src/ssl/t1_lib.c5
3 files changed, 7 insertions, 6 deletions
diff --git a/lib/libssl/src/ssl/s3_lib.c b/lib/libssl/src/ssl/s3_lib.c
index decdda90a3d..8a40b758a92 100644
--- a/lib/libssl/src/ssl/s3_lib.c
+++ b/lib/libssl/src/ssl/s3_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s3_lib.c,v 1.70 2014/07/12 22:33:39 jsing Exp $ */
+/* $OpenBSD: s3_lib.c,v 1.71 2014/07/13 16:03:10 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -2566,7 +2566,7 @@ ssl3_ctrl(SSL *s, int cmd, long larg, void *parg)
SSL_R_SSL3_EXT_INVALID_SERVERNAME);
return 0;
}
- if ((s->tlsext_hostname = BUF_strdup((char *)parg))
+ if ((s->tlsext_hostname = strdup((char *)parg))
== NULL) {
SSLerr(SSL_F_SSL3_CTRL,
ERR_R_INTERNAL_ERROR);
diff --git a/lib/libssl/src/ssl/ssl_sess.c b/lib/libssl/src/ssl/ssl_sess.c
index 101da82b562..d1cd4186016 100644
--- a/lib/libssl/src/ssl/ssl_sess.c
+++ b/lib/libssl/src/ssl/ssl_sess.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_sess.c,v 1.37 2014/07/12 23:59:11 jsing Exp $ */
+/* $OpenBSD: ssl_sess.c,v 1.38 2014/07/13 16:03:10 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -367,7 +367,7 @@ ssl_get_new_session(SSL *s, int session)
sess_id_done:
if (s->tlsext_hostname) {
- ss->tlsext_hostname = BUF_strdup(s->tlsext_hostname);
+ ss->tlsext_hostname = strdup(s->tlsext_hostname);
if (ss->tlsext_hostname == NULL) {
SSLerr(SSL_F_SSL_GET_NEW_SESSION,
ERR_R_INTERNAL_ERROR);
diff --git a/lib/libssl/src/ssl/t1_lib.c b/lib/libssl/src/ssl/t1_lib.c
index 46b47a95b7b..d82573fdb63 100644
--- a/lib/libssl/src/ssl/t1_lib.c
+++ b/lib/libssl/src/ssl/t1_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: t1_lib.c,v 1.50 2014/07/12 22:33:39 jsing Exp $ */
+/* $OpenBSD: t1_lib.c,v 1.51 2014/07/13 16:03:10 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1426,7 +1426,8 @@ ssl_parse_serverhello_tlsext(SSL *s, unsigned char **p, unsigned char *d,
if (!s->hit && tlsext_servername == 1) {
if (s->tlsext_hostname) {
if (s->session->tlsext_hostname == NULL) {
- s->session->tlsext_hostname = BUF_strdup(s->tlsext_hostname);
+ s->session->tlsext_hostname =
+ strdup(s->tlsext_hostname);
if (!s->session->tlsext_hostname) {
*al = SSL_AD_UNRECOGNIZED_NAME;