setupapi: Make sure DeviceInterfaceData->cbSize is initialized in SetupDiEnumDeviceInterfaces.

This commit is contained in:
Austin English 2014-03-14 19:45:19 -04:00 committed by Alexandre Julliard
parent 7071bf199f
commit 8d854a4830
1 changed files with 3 additions and 0 deletions

View File

@ -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 =