mirror of
https://github.com/reactos/reactos.git
synced 2024-07-17 18:06:11 +00:00
[NTOS:IO]
- Add missing SEH around user buffer access in IopCompleteRequest - Remove a redundant condition CORE-9624 svn path=/trunk/; revision=67485
This commit is contained in:
parent
fd81042a22
commit
6a200446dc
|
@ -284,10 +284,18 @@ IopCompleteRequest(IN PKAPC Apc,
|
||||||
(Irp->IoStatus.Status != STATUS_VERIFY_REQUIRED) &&
|
(Irp->IoStatus.Status != STATUS_VERIFY_REQUIRED) &&
|
||||||
!(NT_ERROR(Irp->IoStatus.Status)))
|
!(NT_ERROR(Irp->IoStatus.Status)))
|
||||||
{
|
{
|
||||||
/* Copy the buffer back to the user */
|
_SEH2_TRY
|
||||||
RtlCopyMemory(Irp->UserBuffer,
|
{
|
||||||
Irp->AssociatedIrp.SystemBuffer,
|
/* Copy the buffer back to the user */
|
||||||
Irp->IoStatus.Information);
|
RtlCopyMemory(Irp->UserBuffer,
|
||||||
|
Irp->AssociatedIrp.SystemBuffer,
|
||||||
|
Irp->IoStatus.Information);
|
||||||
|
}
|
||||||
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||||
|
{
|
||||||
|
/* Do nothing */
|
||||||
|
}
|
||||||
|
_SEH2_END;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Also check if we should de-allocate it */
|
/* Also check if we should de-allocate it */
|
||||||
|
@ -317,10 +325,9 @@ IopCompleteRequest(IN PKAPC Apc,
|
||||||
* (but warnings are OK!), or if it was completed with an error, but
|
* (but warnings are OK!), or if it was completed with an error, but
|
||||||
* did return from a pending I/O Operation and is not synchronous.
|
* did return from a pending I/O Operation and is not synchronous.
|
||||||
*/
|
*/
|
||||||
if (!(NT_ERROR(Irp->IoStatus.Status)) ||
|
if (!NT_ERROR(Irp->IoStatus.Status) ||
|
||||||
(NT_ERROR(Irp->IoStatus.Status) &&
|
(Irp->PendingReturned &&
|
||||||
(Irp->PendingReturned) &&
|
!IsIrpSynchronous(Irp, FileObject)))
|
||||||
!(IsIrpSynchronous(Irp, FileObject))))
|
|
||||||
{
|
{
|
||||||
/* Get any information we need from the FO before we kill it */
|
/* Get any information we need from the FO before we kill it */
|
||||||
if ((FileObject) && (FileObject->CompletionContext))
|
if ((FileObject) && (FileObject->CompletionContext))
|
||||||
|
|
Loading…
Reference in a new issue