From: Alan T. DeKok Date: Thu, 15 Dec 2022 14:19:12 +0000 (-0500) Subject: opendir may fail. Fixes #4827 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b57fc0388966cd8ffe0322bdc2fc67f98c2f82a;p=thirdparty%2Ffreeradius-server.git opendir may fail. Fixes #4827 --- diff --git a/scripts/jlibtool.c b/scripts/jlibtool.c index 26a80bbccef..67c6553e840 100644 --- a/scripts/jlibtool.c +++ b/scripts/jlibtool.c @@ -1938,6 +1938,10 @@ static int explode_static_lib(command_t *cmd, char const *lib) chdir(savewd); dir = opendir(tmpdir); + if (!dir) { + ERROR("Failed opening %s - %s", tmpdir, strerror(errno)); + exit(1); + } while ((entry = readdir(dir)) != NULL) { if (IS_TARGET(macos) && toolset->ranlib) {