diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-11-04 20:26:41 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-11-04 20:41:31 +0000 |
commit | b4f3eaf082064cdebd6951e95b2e26d10a384ab9 (patch) | |
tree | 04e857471ce70c251abec3002b954e496816dc08 | |
parent | d85b74fd727833be1d8adf76d293edcfe091a049 (diff) | |
download | netsurf-b4f3eaf082064cdebd6951e95b2e26d10a384ab9.tar.gz netsurf-b4f3eaf082064cdebd6951e95b2e26d10a384ab9.tar.bz2 |
check stat return value (fixes coverity 1109842)
-rw-r--r-- | gtk/theme.c | 4 |
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); |