提交 ee8f7858 编写于 作者: D Dr. Stephen Henson

Check suffixes properly.

Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 f22ff0eb
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册