Only convert '/'s to '\\'s up to the '\0' as the rest of the buffer
may not be initialized (found by Valgrind).
This commit is contained in:
parent
e998d0e3cb
commit
82bff6bddd
|
@ -478,7 +478,7 @@ static ULONG get_full_path_helper(LPCWSTR name, LPWSTR buffer, ULONG size)
|
||||||
strcatW(buffer, name);
|
strcatW(buffer, name);
|
||||||
|
|
||||||
/* convert every / into a \ */
|
/* convert every / into a \ */
|
||||||
for (ptr = buffer; ptr < buffer + size / sizeof(WCHAR); ptr++)
|
for (ptr = buffer; *ptr; ptr++)
|
||||||
if (*ptr == '/') *ptr = '\\';
|
if (*ptr == '/') *ptr = '\\';
|
||||||
|
|
||||||
reqsize -= sizeof(WCHAR); /* don't count trailing \0 */
|
reqsize -= sizeof(WCHAR); /* don't count trailing \0 */
|
||||||
|
|
Loading…
Reference in New Issue