From 37547e9f5f246888cd3dce2f80e10282566220bd Mon Sep 17 00:00:00 2001 From: Qualys Security Advisory Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] skill: Check the return value of fstat(). --- skill.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/skill.c b/skill.c index effd7788..f32e918e 100644 --- a/skill.c +++ b/skill.c @@ -187,7 +187,8 @@ static void check_proc(int pid, struct run_time_conf_t *run_time) xwarn(_("cannot open file %s"), buf); return; } - fstat(fd, &statbuf); + if (fstat(fd, &statbuf) != 0) + goto closure; if (uids) { /* check the EUID */ i = uid_count;