From 909247b30c58e971994251b7bf7092e9dd8967df Mon Sep 17 00:00:00 2001 From: beck <> Date: Thu, 16 Oct 2014 03:19:02 +0000 Subject: Get rid of the last remaining BUF_strdup and BUF_strlcpy and friends, use intrinsic functions everywhere, and wrap these functions in an #ifndef LIBRESSL_INTERNAL to make sure we don't bring their use back. --- src/lib/libcrypto/x509/x509_trs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lib/libcrypto/x509/x509_trs.c') diff --git a/src/lib/libcrypto/x509/x509_trs.c b/src/lib/libcrypto/x509/x509_trs.c index 544fb5e884..d4e6be65e6 100644 --- a/src/lib/libcrypto/x509/x509_trs.c +++ b/src/lib/libcrypto/x509/x509_trs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_trs.c,v 1.16 2014/09/28 10:52:59 miod Exp $ */ +/* $OpenBSD: x509_trs.c,v 1.17 2014/10/16 03:19:02 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -57,6 +57,7 @@ */ #include +#include #include #include @@ -202,7 +203,7 @@ X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int), if (trtmp->flags & X509_TRUST_DYNAMIC_NAME) free(trtmp->name); /* dup supplied name */ - if ((trtmp->name = BUF_strdup(name)) == NULL) + if (name == NULL || (trtmp->name = strdup(name)) == NULL) goto err; /* Keep the dynamic flag of existing entry */ trtmp->flags &= X509_TRUST_DYNAMIC; -- cgit v1.2.3-55-g6feb