From ea46f5e0e5fbd21ac76876b57f5631c8b4263623 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Mon, 25 Dec 2006 09:43:46 +0000 Subject: [PATCH] Replace strdup() with BUF_strdup(). --- crypto/x509v3/v3_addr.c | 7 ++++--- engines/ccgost/gost_ctl.c | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/crypto/x509v3/v3_addr.c b/crypto/x509v3/v3_addr.c index 9580896096..b9be9995e1 100644 --- a/crypto/x509v3/v3_addr.c +++ b/crypto/x509v3/v3_addr.c @@ -66,6 +66,7 @@ #include #include #include +#include #include #ifndef OPENSSL_NO_RFC3779 @@ -934,7 +935,7 @@ static void *v2i_IPAddrBlocks(struct v3_ext_method *method, length = length_from_afi(afi); /* - * Handle SAFI, if any, and strdup() so we can null-terminate + * Handle SAFI, if any, and BUF_strdup() so we can null-terminate * the other input values. */ if (safi != NULL) { @@ -946,9 +947,9 @@ static void *v2i_IPAddrBlocks(struct v3_ext_method *method, goto err; } t += strspn(t, " \t"); - s = strdup(t); + s = BUF_strdup(t); } else { - s = strdup(val->value); + s = BUF_strdup(val->value); } if (s == NULL) { X509V3err(X509V3_F_V2I_IPADDRBLOCKS, ERR_R_MALLOC_FAILURE); diff --git a/engines/ccgost/gost_ctl.c b/engines/ccgost/gost_ctl.c index e31e1f9776..d94089b9cb 100644 --- a/engines/ccgost/gost_ctl.c +++ b/engines/ccgost/gost_ctl.c @@ -9,6 +9,7 @@ #include #include #include +#include #include "gost_lcl.h" static char *gost_params[GOST_PARAM_MAX+1]={NULL}; @@ -54,7 +55,7 @@ const char *get_gost_engine_param(int param) tmp = getenv(gost_envnames[param]); if (tmp) { - gost_params[param] = strdup(tmp); + gost_params[param] = BUF_strdup(tmp); return gost_params[param]; } return NULL; @@ -68,7 +69,7 @@ int gost_set_default_param(int param, const char *value) /* if there is value in the environment, use it, else -passed string * */ if (!tmp) tmp=value; if (gost_params[param]) free(gost_params[param]); - gost_params[param] = strdup(tmp); + gost_params[param] = BUF_strdup(tmp); return 1; } -- 2.25.1