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)
This commit is contained in:
Tomas Mraz 2021-06-09 16:42:35 +02:00 committed by Pauli
parent 6cf811e867
commit d475a9efcf

View File

@ -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)