setupapi: Always initialize output parameter to avoid crash in buggy applications.

This commit is contained in:
Juan Lang 2011-05-14 14:55:28 -07:00 committed by Alexandre Julliard
parent 73e50ba60e
commit 53b2875309
1 changed files with 2 additions and 0 deletions

View File

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