]> Dogcows Code - chaz/openbox/commitdiff
stat() can give an error, handle that
authorDana Jansens <danakj@orodu.net>
Fri, 16 Apr 2010 15:41:13 +0000 (11:41 -0400)
committerMikael Magnusson <mikachu@gmail.com>
Fri, 16 Apr 2010 18:56:24 +0000 (20:56 +0200)
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.028076 seconds and 4 git commands to generate.