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/store/str_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/libcrypto/store/str_lib.c') diff --git a/src/lib/libcrypto/store/str_lib.c b/src/lib/libcrypto/store/str_lib.c index ff00aa19ce..9ae93b6405 100644 --- a/src/lib/libcrypto/store/str_lib.c +++ b/src/lib/libcrypto/store/str_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: str_lib.c,v 1.10 2014/07/10 22:45:58 jsing Exp $ */ +/* $OpenBSD: str_lib.c,v 1.11 2014/10/16 03:19:02 beck Exp $ */ /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL * project 2003. */ @@ -1341,7 +1341,7 @@ STORE_ATTR_INFO_set_cstr(STORE_ATTR_INFO *attrs, STORE_ATTR_TYPES code, return 0; } if (!ATTR_IS_SET(attrs, code)) { - if ((attrs->values[code].cstring = BUF_strndup(cstr, cstr_size))) + if (cstr && (attrs->values[code].cstring = strndup(cstr, cstr_size))) return 1; STOREerr(STORE_F_STORE_ATTR_INFO_SET_CSTR, ERR_R_MALLOC_FAILURE); -- cgit v1.2.3-55-g6feb