mirror of
https://github.com/mirror/make.git
synced 2025-02-11 20:31:19 +08:00
(search_path): Use safe_stat in place of stat.
This commit is contained in:
parent
84091971f9
commit
535dcf6a22
2
job.c
2
job.c
@ -1062,7 +1062,7 @@ search_path (file, path, program)
|
|||||||
bcopy (file, program + (p - path) + 1, len);
|
bcopy (file, program + (p - path) + 1, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stat (program, &st) == 0
|
if (safe_stat (program, &st) == 0
|
||||||
&& S_ISREG (st.st_mode))
|
&& S_ISREG (st.st_mode))
|
||||||
{
|
{
|
||||||
if (st.st_uid == geteuid ())
|
if (st.st_uid == geteuid ())
|
||||||
|
Loading…
Reference in New Issue
Block a user