setupapi: Make sure DeviceInterfaceData->cbSize is initialized in SetupDiEnumDeviceInterfaces.
This commit is contained in:
parent
7071bf199f
commit
8d854a4830
|
@ -2795,8 +2795,11 @@ BOOL WINAPI SetupDiEnumDeviceInterfaces(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA
|
|||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* In case application fails to check return value, clear output */
|
||||
memset(DeviceInterfaceData, 0, sizeof(*DeviceInterfaceData));
|
||||
DeviceInterfaceData->cbSize = sizeof(SP_DEVICE_INTERFACE_DATA);
|
||||
|
||||
if (DeviceInfoData)
|
||||
{
|
||||
struct DeviceInfo *devInfo =
|
||||
|
|
Loading…
Reference in New Issue