- Do not write beyond the buffer.

svn path=/trunk/; revision=26553
This commit is contained in:
Dmitry Gorbachev 2007-04-28 04:10:19 +00:00
parent a29c27d211
commit 4b61211e6d

View file

@ -188,7 +188,7 @@ SetupDiCreateDeviceInfoListExW(
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
goto cleanup;
}
ZeroMemory(list, sizeof(struct DeviceInfoSet));
ZeroMemory(list, FIELD_OFFSET(struct DeviceInfoSet, szData));
list->magic = SETUP_DEV_INFO_SET_MAGIC;
memcpy(