mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-22 22:00:49 +00:00
Check that the result of opendir is not NULL, to prevent crash for
not-existing library paths git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@12103 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f67e1db960
commit
92b3ea2f7e
1 changed files with 7 additions and 1 deletions
|
@ -236,9 +236,15 @@ int search_for_library_with_type (const char *library_name,
|
|||
{
|
||||
fprintf (stderr, " Path: %s\n", library_paths[i]);
|
||||
}
|
||||
|
||||
|
||||
dir = opendir (library_paths[i]);
|
||||
|
||||
if (dir == NULL)
|
||||
{
|
||||
/* For some reasons, we can't read that path. */
|
||||
continue;
|
||||
}
|
||||
|
||||
while ((dirbuf = readdir (dir)))
|
||||
{
|
||||
/* Skip if it doesn't begin with 'lib'. This implicitly
|
||||
|
|
Loading…
Reference in a new issue