mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
- Add SEH protection at memory copying. Fixes crash at "setupapi_winetest devinst"
svn path=/trunk/; revision=42064
This commit is contained in:
parent
100a69c0f3
commit
2794a2eba0
1 changed files with 12 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue