[SETUPAPI]

- Buffer lengths are calculated in chars not bytes.
- Fixes use of CM_Get_Device_ID_Size / CM_Get_Device_ID

svn path=/trunk/; revision=69327
This commit is contained in:
Ged Murphy 2015-09-23 09:27:32 +00:00
parent 749209aeaf
commit 6a3a86fe62

View file

@ -784,7 +784,7 @@ pSetupStringTableStringFromIdEx(HSTRING_TABLE hStringTable,
return FALSE;
}
dwLength = (lstrlenW(pStringTable->pSlots[dwId - 1].pString) + 1) * sizeof(WCHAR);
dwLength = (lstrlenW(pStringTable->pSlots[dwId - 1].pString) + 1);
if (dwLength <= *lpBufferLength)
{
lstrcpyW(lpBuffer, pStringTable->pSlots[dwId - 1].pString);