From f928d1de2411dafe69c50d139c18c7653cabc751 Mon Sep 17 00:00:00 2001 From: Bob Beck Date: Tue, 22 Jul 2014 02:21:21 +0000 Subject: Kill a bunch more BUF_strdup's - these are converted to have a check for NULL before an intrinsic strdup. ok miod@ --- lib/libcrypto/x509/x509_vpm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/libcrypto/x509') 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; -- cgit v1.2.3