projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e27041
)
Added error return in GetFileAttributesExA.
author
Armin Novak
<armin.novak@thincast.com>
Tue, 11 Apr 2017 09:32:45 +0000
(11:32 +0200)
committer
Armin Novak
<armin.novak@thincast.com>
Tue, 11 Apr 2017 09:34:11 +0000
(11:34 +0200)
winpr/libwinpr/file/generic.c
patch
|
blob
|
history
diff --git
a/winpr/libwinpr/file/generic.c
b/winpr/libwinpr/file/generic.c
index
d6ab277
..
7d7be52
100644
(file)
--- a/
winpr/libwinpr/file/generic.c
+++ b/
winpr/libwinpr/file/generic.c
@@
-475,8
+475,10
@@
BOOL WINAPI GetFileAttributesExA(LPCSTR lpFileName, GET_FILEEX_INFO_LEVELS fInfo
WIN32_FIND_DATAA findFileData;
HANDLE hFind;
- if ((hFind = FindFirstFileA(lpFileName, &findFileData)) != INVALID_HANDLE_VALUE)
- FindClose(hFind);
+ if ((hFind = FindFirstFileA(lpFileName, &findFileData)) == INVALID_HANDLE_VALUE)
+ return FALSE;
+
+ FindClose(hFind);
fd->dwFileAttributes = findFileData.dwFileAttributes;
fd->ftCreationTime = findFileData.ftCreationTime;