mirror of
https://github.com/openssl/openssl.git
synced 2025-03-07 19:38:33 +08:00
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:
parent
6cf811e867
commit
d475a9efcf
@ -224,7 +224,7 @@ static char *dl_name_converter(DSO *dso, const char *filename)
|
|||||||
len = strlen(filename);
|
len = strlen(filename);
|
||||||
rsize = len + 1;
|
rsize = len + 1;
|
||||||
transform = (strstr(filename, "/") == NULL);
|
transform = (strstr(filename, "/") == NULL);
|
||||||
{
|
if (transform) {
|
||||||
/* We will convert this to "%s.s?" or "lib%s.s?" */
|
/* We will convert this to "%s.s?" or "lib%s.s?" */
|
||||||
rsize += strlen(DSO_EXTENSION); /* The length of ".s?" */
|
rsize += strlen(DSO_EXTENSION); /* The length of ".s?" */
|
||||||
if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0)
|
if ((DSO_flags(dso) & DSO_FLAG_NAME_TRANSLATION_EXT_ONLY) == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user