From: James Jones Date: Tue, 9 Aug 2022 22:28:07 +0000 (-0500) Subject: Correct check for no extension in check_library_exists() (#4655) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b75346124cf8349b7ad3d9be2356913323fe0f32;p=thirdparty%2Ffreeradius-server.git Correct check for no extension in check_library_exists() (#4655) If libdircheck is true, add_dotlibs() will put .lib/ at the start of newarg so that ext will never be NULL. --- diff --git a/scripts/jlibtool.c b/scripts/jlibtool.c index 072c0179570..72cd6441691 100644 --- a/scripts/jlibtool.c +++ b/scripts/jlibtool.c @@ -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);