setupapi: Always initialize output parameter to avoid crash in buggy applications.
This commit is contained in:
parent
73e50ba60e
commit
53b2875309
|
@ -2821,6 +2821,8 @@ BOOL WINAPI SetupDiEnumDeviceInterfaces(
|
|||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
/* In case application fails to check return value, clear output */
|
||||
memset(DeviceInterfaceData, 0, sizeof(*DeviceInterfaceData));
|
||||
if (DeviceInfoData)
|
||||
{
|
||||
struct DeviceInfo *devInfo =
|
||||
|
|
Loading…
Reference in New Issue