]> Dogcows Code - chaz/openbox/blobdiff - obt/paths.c
stat() can give an error, handle that
[chaz/openbox] / obt / paths.c
index e2e4859b8d94385053c1f50bcf46a172bdc71b5e..8afe4f711fe67b76cca7debeb55524ac98119615 100644 (file)
@@ -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;
This page took 0.019843 seconds and 4 git commands to generate.