ntdll: Do not accept device control requests with invalid and/or incompa tible handles

Peter Dons Tychsen donpedro at tdcadsl.dk
Sat Sep 12 18:25:37 CDT 2009


OK. The "bad handle" is tested by the "deadbeef" handle.
Where is the best place to get a really good "wrong class" handle?

Thanks,

/pedro

----- Original meddelelse -----

> Fra: Alexandre Julliard <julliard at winehq.org>
> Til: Peter Dons Tychsen <donpedro at tdcadsl.dk>
> Cc: wine-devel at winehq.org
> Dato: Tor, 10. sep 2009 22:20
> Emne: Re: ntdll: Do not accept device control requests with invalid
> and/or incompa tible handles
> 
> Peter Dons Tychsen <donpedro at tdcadsl.dk> writes:
> 
> > Thanks for the comments.
> > Not sure i understand them though.
> >
> > The whole point of the test was to test what happens when you use a
> wrong
> > handle. The actual bug i fixed was that it was possible to for
> programs
> > to send invalid handles to IoControl. Cygwin was infact sending
> handles
> > to ntdll.dll which originated from GetStdHandle().
> >
> > So i think using this API for testing is relevant, as the point of
> the
> > test is to verify that handles of the completely wrong class are
> > rejected, and not just "bad handles".
> 
> Yes, but then you should explicitly construct and test both kinds of
> handles. Using GetStdHandle will either be a wrong class or a bad
> handle
> depending on whether stdio is to a file or to a console, so you don't
> really know which case you are testing. The remapping of console
> handles
> happens in kernel32, not in ntdll, so it doesn't really make sense to
> pass the result of GetStdHandle straight to ntdll.
> 
> --
> Alexandre Julliard
> julliard at winehq.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20090913/1fecee47/attachment.htm>


More information about the wine-devel mailing list