Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Check return of stat64 from XFileUtils.cpp

  • Loading branch information...
commit d31305cab62e67399c65a0bddfd123f3947ec1f8 1 parent f287357
Kyle Hill authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 xbmc/linux/XFileUtils.cpp
View
4 xbmc/linux/XFileUtils.cpp
@@ -154,7 +154,9 @@ BOOL FindNextFile(HANDLE hHandle, LPWIN32_FIND_DATA lpFindData)
struct stat64 fileStat;
memset(&fileStat, 0, sizeof(fileStat));
- stat64(strFileNameTest, &fileStat);
+
+ if (stat64(strFileNameTest, &fileStat) == -1)
+ return FALSE;
bool bIsDir = false;
if (S_ISDIR(fileStat.st_mode))

1 comment on commit d31305c

@anssih
Collaborator

@kylhill, I've reverted this commit in 13c4fa3 since we do not want to return FALSE here (see commit msg). If this is one of only few false positives of the static analysis, I guess a "(void)" prefix could be added to the call if you think it helps.

Please sign in to comment.
Something went wrong with that request. Please try again.