summaryrefslogtreecommitdiff
path: root/lib/libcrypto/x509
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2014-07-22 02:21:21 +0000
committerBob Beck <beck@cvs.openbsd.org>2014-07-22 02:21:21 +0000
commitf928d1de2411dafe69c50d139c18c7653cabc751 (patch)
tree45a8811543b166768a1cb760d5d8724640fcf1d0 /lib/libcrypto/x509
parent93b3e769e924b98c416d6a0ee1bea74be51d0005 (diff)
Kill a bunch more BUF_strdup's - these are converted to have a check for
NULL before an intrinsic strdup. ok miod@
Diffstat (limited to 'lib/libcrypto/x509')
-rw-r--r--lib/libcrypto/x509/x509_vpm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libcrypto/x509/x509_vpm.c b/lib/libcrypto/x509/x509_vpm.c
index ec352672985..4ad2350222e 100644
--- a/lib/libcrypto/x509/x509_vpm.c
+++ b/lib/libcrypto/x509/x509_vpm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509_vpm.c,v 1.9 2014/07/11 08:44:49 jsing Exp $ */
+/* $OpenBSD: x509_vpm.c,v 1.10 2014/07/22 02:21:20 beck Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2004.
*/
@@ -213,7 +213,9 @@ int
X509_VERIFY_PARAM_set1_name(X509_VERIFY_PARAM *param, const char *name)
{
free(param->name);
- param->name = BUF_strdup(name);
+ if (name == NULL)
+ return 1;
+ param->name = strdup(name);
if (param->name)
return 1;
return 0;