mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 12:23:30 +00:00
GetFullPathName returns length without nul byte
svn path=/trunk/; revision=11211
This commit is contained in:
@@ -1063,6 +1063,7 @@ HINF WINAPI SetupOpenInfFileW( PCWSTR name, PCWSTR class, DWORD style, UINT *err
|
||||
if (strchrW( name, '\\' ) || strchrW( name, '/' ))
|
||||
{
|
||||
if (!(len = GetFullPathNameW( name, 0, NULL, NULL ))) return (HINF)INVALID_HANDLE_VALUE;
|
||||
len++; /* Make room for terminating NUL byte */
|
||||
if (!(path = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) )))
|
||||
{
|
||||
SetLastError( ERROR_NOT_ENOUGH_MEMORY );
|
||||
|
||||
Reference in New Issue
Block a user