diff options
author | beck <> | 2014-10-16 03:19:02 +0000 |
---|---|---|
committer | beck <> | 2014-10-16 03:19:02 +0000 |
commit | 909247b30c58e971994251b7bf7092e9dd8967df (patch) | |
tree | 7ece308937377519bc98e92f91a60254d78bd0be /src/lib/libcrypto/store/str_lib.c | |
parent | 2a0ad3abadc99c32f111a2f2aaa9131c0acf27cb (diff) | |
download | openbsd-909247b30c58e971994251b7bf7092e9dd8967df.tar.gz openbsd-909247b30c58e971994251b7bf7092e9dd8967df.tar.bz2 openbsd-909247b30c58e971994251b7bf7092e9dd8967df.zip |
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.
Diffstat (limited to 'src/lib/libcrypto/store/str_lib.c')
-rw-r--r-- | src/lib/libcrypto/store/str_lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 @@ | |||
1 | /* $OpenBSD: str_lib.c,v 1.10 2014/07/10 22:45:58 jsing Exp $ */ | 1 | /* $OpenBSD: str_lib.c,v 1.11 2014/10/16 03:19:02 beck Exp $ */ |
2 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL | 2 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL |
3 | * project 2003. | 3 | * project 2003. |
4 | */ | 4 | */ |
@@ -1341,7 +1341,7 @@ STORE_ATTR_INFO_set_cstr(STORE_ATTR_INFO *attrs, STORE_ATTR_TYPES code, | |||
1341 | return 0; | 1341 | return 0; |
1342 | } | 1342 | } |
1343 | if (!ATTR_IS_SET(attrs, code)) { | 1343 | if (!ATTR_IS_SET(attrs, code)) { |
1344 | if ((attrs->values[code].cstring = BUF_strndup(cstr, cstr_size))) | 1344 | if (cstr && (attrs->values[code].cstring = strndup(cstr, cstr_size))) |
1345 | return 1; | 1345 | return 1; |
1346 | STOREerr(STORE_F_STORE_ATTR_INFO_SET_CSTR, | 1346 | STOREerr(STORE_F_STORE_ATTR_INFO_SET_CSTR, |
1347 | ERR_R_MALLOC_FAILURE); | 1347 | ERR_R_MALLOC_FAILURE); |