Commit ee8f7858 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

Check suffixes properly.



Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
parent f22ff0eb
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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);