From: Dana Jansens Date: Fri, 16 Apr 2010 15:41:13 +0000 (-0400) Subject: stat() can give an error, handle that X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fopenbox;a=commitdiff_plain;h=3afa20de54814b1abb447542d72c3b795892932d stat() can give an error, handle that --- 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;