mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
ntdll: Fixed off-by-one error in RtlGetFullPathName_U (spotted by Michael Builov).
This commit is contained in:
parent
8882936073
commit
7475ecac53
@ -809,7 +809,7 @@ DWORD WINAPI RtlGetFullPathName_U(const WCHAR* name, ULONG size, WCHAR* buffer,
|
||||
{
|
||||
LPWSTR tmp = RtlAllocateHeap(GetProcessHeap(), 0, reqsize);
|
||||
reqsize = get_full_path_helper(name, tmp, reqsize);
|
||||
if (reqsize > size) /* it may have worked the second time */
|
||||
if (reqsize + sizeof(WCHAR) > size) /* it may have worked the second time */
|
||||
{
|
||||
RtlFreeHeap(GetProcessHeap(), 0, tmp);
|
||||
return reqsize + sizeof(WCHAR);
|
||||
|
Loading…
Reference in New Issue
Block a user