[ros-dev] Re: [ros-svn] [hbirr] 14964: Do always set the UserIosb
of an irp in IoSecondStageCompletion.
hartmut.birr at gmx.de
Wed May 4 01:49:23 CEST 2005
Alex Ionescu wrote:
> hbirr at svn.reactos.com wrote:
>> Do always set the UserIosb of an irp in IoSecondStageCompletion.
>> Updated files:
> This is incorrect.
> 1) The IOSB should not always be set. Create a driver and fail an
> operation that you send to yourself by an IRP. Make that IRP not
> SYNCH_API, or better yet, make sure you don't have a File Object.
> You will notice that the Status Block is not touched.
> 2) The IOSB is not checked if it exists, it should ALWAYS be there.
> IRPs without a IOSB are invalid. To verify this, set the IOSB of your
> IRP to 0 and run Windows with a Debugger. You will see that it will
> break in many places, because Windows has simply placed SEH to make
> sure that the write is valid. So the correct thing to do is wrap the
> write in SEH, which protects both against invalid pointers and zero
> ones, but that still doesn't mean they are"valid" and should be
> checked that way.
> Best regards,
> Alex Ionescu
> Ros-dev mailing list
> Ros-dev at reactos.com
Please look at bug #609.
More information about the Ros-dev