mirror of
https://github.com/openssl/openssl.git
synced 2025-03-19 19:50:42 +08:00
Check suffixes properly.
Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
f22ff0eb16
commit
ee8f785873
@ -174,9 +174,11 @@ static int handle_symlink(const char *filename, const char *fullpath)
|
||||
}
|
||||
if (filename[i++] != '.')
|
||||
return -1;
|
||||
for (type = OSSL_NELEM(suffixes) - 1; type > 0; type--)
|
||||
if (strcasecmp(suffixes[type], &filename[i]) == 0)
|
||||
for (type = OSSL_NELEM(suffixes) - 1; type > 0; type--) {
|
||||
const char *suffix = suffixes[type];
|
||||
if (strncasecmp(suffix, &filename[i], strlen(suffix)) == 0)
|
||||
break;
|
||||
}
|
||||
i += strlen(suffixes[type]);
|
||||
|
||||
id = strtoul(&filename[i], &endptr, 10);
|
||||
|
Loading…
x
Reference in New Issue
Block a user