diff options
author | tedu <> | 2014-11-18 03:28:05 +0000 |
---|---|---|
committer | tedu <> | 2014-11-18 03:28:05 +0000 |
commit | 8e184a24232ac494ffc7ec0d41b050fd39b7645d (patch) | |
tree | 6e76bced04c6788e1e0e09ec5873afceb516cd35 /src/lib/libcrypto/store/str_lib.c | |
parent | bfbfc9f97202a8cab8435a93df289559bfa32d7f (diff) | |
download | openbsd-8e184a24232ac494ffc7ec0d41b050fd39b7645d.tar.gz openbsd-8e184a24232ac494ffc7ec0d41b050fd39b7645d.tar.bz2 openbsd-8e184a24232ac494ffc7ec0d41b050fd39b7645d.zip |
further BUF_strdup conversion: these places should be safe to rely on
the function argument not being NULL
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 9ae93b6405..2ea3ad958a 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.11 2014/10/16 03:19:02 beck Exp $ */ | 1 | /* $OpenBSD: str_lib.c,v 1.12 2014/11/18 03:28:05 tedu 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 (cstr && (attrs->values[code].cstring = strndup(cstr, cstr_size))) | 1344 | if ((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); |