From: Richard Levitte Date: Thu, 20 May 2021 08:31:21 +0000 (+0200) Subject: VMS: don't use app_malloc() in apps/lib/vms_decc_argv.c X-Git-Tag: openssl-3.0.0-beta1~439 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a066841554bd23281ae4bb48badc088753f734ca;p=thirdparty%2Fopenssl.git VMS: don't use app_malloc() in apps/lib/vms_decc_argv.c The reason being that it would otherwise force test programs to link with all of libapps.a, which unfortunately causes multiple symbol definition issues. The quick and dirty fix is to use OPENSSL_malloc() instead of app_malloc() in apps/lib/vms_decc_argv.c, and clean up libapps.a later. Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/15368) --- diff --git a/apps/lib/vms_decc_argv.c b/apps/lib/vms_decc_argv.c index 932b51a8376..25b42eb801f 100644 --- a/apps/lib/vms_decc_argv.c +++ b/apps/lib/vms_decc_argv.c @@ -10,7 +10,6 @@ #include #include #include "platform.h" /* for copy_argv() */ -#include "apps.h" /* for app_malloc() */ char **newargv = NULL; @@ -51,7 +50,13 @@ char **copy_argv(int *argc, char *argv[]) cleanup_argv(); - newargv = app_malloc(sizeof(*newargv) * (count + 1), "argv copy"); + /* + * We purposefully use OPENSSL_malloc() rather than app_malloc() here, + * to avoid symbol name clashes in test programs that would otherwise + * get them when linking with all of libapps.a. + * See comment in test/build.info. + */ + newargv = OPENSSL_malloc(sizeof(*newargv) * (count + 1)); if (newargv == NULL) return NULL;