[SETUPAPI]

RequiredSize must be in characters in SetupGetInfFileListW

svn path=/trunk/; revision=68629
This commit is contained in:
Christoph von Wittich 2015-08-08 13:20:39 +00:00
parent bdb599cd5e
commit 52ba781764

View file

@ -2224,7 +2224,7 @@ SetupGetInfFileListW(
}
len = strlenW(wfdFileInfo.cFileName) + 1;
requiredSize += (DWORD)(len * sizeof(WCHAR));
requiredSize += (DWORD)len;
if (requiredSize <= ReturnBufferSize)
{
strcpyW(pBuffer, wfdFileInfo.cFileName);
@ -2234,7 +2234,7 @@ SetupGetInfFileListW(
} while (FindNextFileW(hSearch, &wfdFileInfo));
FindClose(hSearch);
requiredSize += sizeof(WCHAR); /* Final NULL char */
requiredSize += 1; /* Final NULL char */
if (requiredSize <= ReturnBufferSize)
{
*pBuffer = '\0';