summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2021-05-20 10:31:21 +0200
committerRichard Levitte <levitte@openssl.org>2021-05-22 07:20:03 +0200
commita066841554bd23281ae4bb48badc088753f734ca (patch)
tree7ea069334fba1052c4b55a42f36673459073ec8d /apps
parent3f987381929ee725daf4746591144dde18f313e1 (diff)
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 <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15368)
Diffstat (limited to 'apps')
-rw-r--r--apps/lib/vms_decc_argv.c9
1 files changed, 7 insertions, 2 deletions
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 <stdlib.h>
#include <openssl/crypto.h>
#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;