summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-11-04 20:26:41 +0000
committerVincent Sanders <vince@kyllikki.org>2014-11-04 20:41:31 +0000
commitb4f3eaf082064cdebd6951e95b2e26d10a384ab9 (patch)
tree04e857471ce70c251abec3002b954e496816dc08 /gtk
parentd85b74fd727833be1d8adf76d293edcfe091a049 (diff)
downloadnetsurf-b4f3eaf082064cdebd6951e95b2e26d10a384ab9.tar.gz
netsurf-b4f3eaf082064cdebd6951e95b2e26d10a384ab9.tar.bz2
check stat return value (fixes coverity 1109842)
Diffstat (limited to 'gtk')
-rw-r--r--gtk/theme.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/theme.c b/gtk/theme.c
index 8612c3948..e7f292b88 100644
--- a/gtk/theme.c
+++ b/gtk/theme.c
@@ -111,8 +111,8 @@ static bool nsgtk_theme_verify(const char *themename)
buf);
/* check every directory */
if (access(testfile, R_OK) == 0) {
- stat(testfile, &sta);
- if (S_ISDIR(sta.st_mode)) {
+ if ((stat(testfile, &sta) == 0) &&
+ (S_ISDIR(sta.st_mode))) {
buf[strlen(buf)] = '\n';
/* "\0\0" -> "\n\0" */
strcat(filecontent, buf);