Fix uninitialised data if the result is NULL.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
parent
4873e1f020
commit
8f92e63f45
1 changed files with 5 additions and 1 deletions
|
@ -150,7 +150,11 @@ DWORD GetFileAttributes(const char * filename)
|
|||
|
||||
DWORD GetFullPathName(const char* filename, DWORD length, char * buffer, char ** filePart)
|
||||
{
|
||||
realpath(filename, buffer);
|
||||
const char * result = realpath(filename, buffer);
|
||||
if (!result)
|
||||
{
|
||||
*buffer = 0;
|
||||
}
|
||||
return strlen(buffer);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue