mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
- Add SEH protection at memory copying. Fixes crash at "setupapi_winetest devinst"
svn path=/trunk/; revision=42064
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user