summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509/x509_trs.c
diff options
context:
space:
mode:
authortedu <>2014-11-18 03:28:05 +0000
committertedu <>2014-11-18 03:28:05 +0000
commit8e184a24232ac494ffc7ec0d41b050fd39b7645d (patch)
tree6e76bced04c6788e1e0e09ec5873afceb516cd35 /src/lib/libcrypto/x509/x509_trs.c
parentbfbfc9f97202a8cab8435a93df289559bfa32d7f (diff)
downloadopenbsd-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/x509/x509_trs.c')
-rw-r--r--src/lib/libcrypto/x509/x509_trs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/x509/x509_trs.c b/src/lib/libcrypto/x509/x509_trs.c
index d4e6be65e6..95fb568c68 100644
--- a/src/lib/libcrypto/x509/x509_trs.c
+++ b/src/lib/libcrypto/x509/x509_trs.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_trs.c,v 1.17 2014/10/16 03:19:02 beck Exp $ */ 1/* $OpenBSD: x509_trs.c,v 1.18 2014/11/18 03:28:05 tedu Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -203,7 +203,7 @@ X509_TRUST_add(int id, int flags, int (*ck)(X509_TRUST *, X509 *, int),
203 if (trtmp->flags & X509_TRUST_DYNAMIC_NAME) 203 if (trtmp->flags & X509_TRUST_DYNAMIC_NAME)
204 free(trtmp->name); 204 free(trtmp->name);
205 /* dup supplied name */ 205 /* dup supplied name */
206 if (name == NULL || (trtmp->name = strdup(name)) == NULL) 206 if ((trtmp->name = strdup(name)) == NULL)
207 goto err; 207 goto err;
208 /* Keep the dynamic flag of existing entry */ 208 /* Keep the dynamic flag of existing entry */
209 trtmp->flags &= X509_TRUST_DYNAMIC; 209 trtmp->flags &= X509_TRUST_DYNAMIC;