[SETUPAPI] Fix wrong buffer size given to CM_Get_Device_ID_List_ExW

This buffer overflow was introduced in previous commit.
This commit is contained in:
Hervé Poussineau 2021-04-03 00:51:23 +02:00
parent 0f3133c308
commit 4712deb8a8

View file

@ -142,7 +142,7 @@ SETUP_CreateDevicesList(
{
cr = CM_Get_Device_ID_List_ExW(Enumerator,
Buffer,
BufferLength,
BufferLength / sizeof(WCHAR),
Enumerator ? CM_GETIDLIST_FILTER_ENUMERATOR : CM_GETIDLIST_FILTER_NONE,
list->hMachine);
if (cr == CR_BUFFER_SMALL)