From d24addb280cf16fdb7e54863aff449c123faf500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Wed, 6 Oct 2004 23:46:09 +0000 Subject: [PATCH] GetFullPathName returns length without nul byte svn path=/trunk/; revision=11211 --- reactos/lib/setupapi/parser.c | 1 + 1 file changed, 1 insertion(+) diff --git a/reactos/lib/setupapi/parser.c b/reactos/lib/setupapi/parser.c index 8c760f01b75..2652b2b1580 100644 --- a/reactos/lib/setupapi/parser.c +++ b/reactos/lib/setupapi/parser.c @@ -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 );