- Add SEH protection at memory copying. Fixes crash at "setupapi_winetest devinst"

svn path=/trunk/; revision=42064
This commit is contained in:
Dmitry Chapyshev 2009-07-18 19:22:12 +00:00
parent 100a69c0f3
commit 2794a2eba0

View file

@ -4137,8 +4137,19 @@ SetupDiGetDeviceInstallParamsW(
Source = &((struct DeviceInfo *)DeviceInfoData->Reserved)->InstallParams;
else
Source = &list->InstallParams;
memcpy(DeviceInstallParams, Source, Source->cbSize);
ret = TRUE;
_SEH2_TRY
{
memcpy(DeviceInstallParams, Source, Source->cbSize);
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
SetLastError(RtlNtStatusToDosError(_SEH2_GetExceptionCode()));
ret = FALSE;
}
_SEH2_END;
}
TRACE("Returning %d\n", ret);