projects
/
claws.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d2b07ae
)
Fix g_stat return value unchecked
author
Colin Leroy
<colin@colino.net>
Thu, 5 Jun 2014 14:53:06 +0000
(16:53 +0200)
committer
Colin Leroy
<colin@colino.net>
Thu, 5 Jun 2014 14:53:06 +0000
(16:53 +0200)
src/addrbook.c
patch
|
blob
|
history
diff --git
a/src/addrbook.c
b/src/addrbook.c
index 8c2bec5197e9568e1f68cff2c85801340d31008a..04e6c8c6c101aac81308ca33d201e8b7d74ecff1 100644
(file)
--- a/
src/addrbook.c
+++ b/
src/addrbook.c
@@
-1829,13
+1829,13
@@
GList *addrbook_get_bookfile_list(AddressBookFile *book) {
while( ( dir_name = g_dir_read_name( dir ) ) != NULL ) {
gchar *endptr = NULL;
- gint i;
+ gint i
, r
;
gboolean flg;
strncpy(buf, adbookdir, WORK_BUFLEN);
strncat(buf, dir_name, WORK_BUFLEN - strlen(buf));
- g_stat(buf, &statbuf);
- if (S_ISREG(statbuf.st_mode)) {
+
r =
g_stat(buf, &statbuf);
+ if (
r == 0 &&
S_ISREG(statbuf.st_mode)) {
if (strncmp(
dir_name,
ADDRBOOK_PREFIX, lenpre) == 0)