]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Correct check for no extension in check_library_exists() (#4655)
authorJames Jones <jejones3141@gmail.com>
Tue, 9 Aug 2022 22:28:07 +0000 (17:28 -0500)
committerGitHub <noreply@github.com>
Tue, 9 Aug 2022 22:28:07 +0000 (18:28 -0400)
If libdircheck is true, add_dotlibs() will put .lib/ at the
start of newarg so that ext will never be NULL.

scripts/jlibtool.c

index 072c01795701e8ffdedeced592c14935b68f1125..72cd6441691accdbb385aef7d04e725375744458 100644 (file)
@@ -1533,7 +1533,7 @@ static char *check_library_exists(command_t *cmd, char const *arg, int pathlen,
 
        strcpy(newarg + newpathlen, arg + pathlen);
        ext = strrchr(newarg, '.');
-       if (!ext) {
+       if (!ext || ext == newarg) {
                ERROR("Error: Library path does not have an extension\n");
                free(newarg);