From 3afa20de54814b1abb447542d72c3b795892932d Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 16 Apr 2010 11:41:13 -0400 Subject: [PATCH] stat() can give an error, handle that --- obt/paths.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/obt/paths.c b/obt/paths.c index e2e4859b..8afe4f71 100644 --- a/obt/paths.c +++ b/obt/paths.c @@ -331,7 +331,8 @@ static inline gboolean try_exec(const ObtPaths *const p, struct stat st; BSEARCH_SETUP(guint); - stat(path, &st); + if (stat(path, &st) != 0) + return FALSE; if (!S_ISREG(st.st_mode)) return FALSE; -- 2.45.2