From 8e184a24232ac494ffc7ec0d41b050fd39b7645d Mon Sep 17 00:00:00 2001 From: tedu <> Date: Tue, 18 Nov 2014 03:28:05 +0000 Subject: further BUF_strdup conversion: these places should be safe to rely on the function argument not being NULL --- 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 9ae93b6405..2ea3ad958a 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.11 2014/10/16 03:19:02 beck Exp $ */ +/* $OpenBSD: str_lib.c,v 1.12 2014/11/18 03:28:05 tedu 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 (cstr && (attrs->values[code].cstring = strndup(cstr, cstr_size))) + if ((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