From: sashan Date: Wed, 26 Mar 2025 08:37:01 +0000 (+0100) Subject: Use OPENSSL_strdup() for strings freed by OPENSSL_free() X-Git-Tag: openssl-3.3.4~115 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac7c93bf6394533981fb730bfb2c6ba048d3261e;p=thirdparty%2Fopenssl.git Use OPENSSL_strdup() for strings freed by OPENSSL_free() Things can get messy when application decides to use it's own memory allocation functions using CRYPTO_set_mem_functions(3ossl) Reviewed-by: Richard Levitte Reviewed-by: Matt Caswell Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/27163) (cherry picked from commit 7fa51041e4d68838b2c7ddf4f77d6bba0edf2735) (cherry picked from commit 49bd72584a6733cd5ce610f4aca1ec92496e1d30) --- diff --git a/test/conf_include_test.c b/test/conf_include_test.c index 2b16c6ebe49..851af5614bb 100644 --- a/test/conf_include_test.c +++ b/test/conf_include_test.c @@ -59,7 +59,7 @@ static char *change_path(const char *file) ret = chdir(s); if (ret == 0) - new_config_name = strdup(last + DIRSEP_PRESERVE + 1); + new_config_name = OPENSSL_strdup(last + DIRSEP_PRESERVE + 1); err: OPENSSL_free(s); return new_config_name;