From a066841554bd23281ae4bb48badc088753f734ca Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Thu, 20 May 2021 10:31:21 +0200 Subject: 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) --- apps/lib/vms_decc_argv.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'apps') diff --git a/apps/lib/vms_decc_argv.c b/apps/lib/vms_decc_argv.c index 932b51a837..25b42eb801 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; -- cgit v1.2.3