summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2021-06-09 16:42:35 +0200
committerPauli <pauli@openssl.org>2021-06-11 00:52:14 +0200
commitd475a9efcfb98fe2d207dbc56bed931ee35b74a6 (patch)
tree018cd4ccbbea81000eea65c4ec7c1672c03ce026 /crypto
parentossl_provider_set_module_path: Prevent potential UAF (diff)
downloadopenssl-d475a9efcfb98fe2d207dbc56bed931ee35b74a6.tar.xz
openssl-d475a9efcfb98fe2d207dbc56bed931ee35b74a6.zip
dl_name_converter: Avoid unnecessary overallocation
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15680)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/dso/dso_dl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/dso/dso_dl.c b/crypto/dso/dso_dl.c
index e41648548e..8d440ab3e2 100644
--- a/crypto/dso/dso_dl.c
+++ b/crypto/dso/dso_dl.c
@@ -224,7 +224,7 @@ static char *dl_name_converter(DSO *dso, const char *filename)
len = strlen(filename);
rsize = len + 1;
transform = (strstr(filename, "/") == NULL);
- {
+ if (transform) {
/* We will convert this to "%s.s?" or "lib%s.s?" */
rsize += strlen(DSO_EXTENSION); /* The length of ".s?" */
if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0)