<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=iso-8859-1" http-equiv="Content-Type">
<style>
pre {
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
</style>
</head>
<body bgcolor="#ffffff" text="#000000">
<div>
OK. The "bad handle" is tested by the "deadbeef" handle.<br />Where is the best place to get a really good "wrong class" handle?<br /><br />Thanks,<br /><br />/pedro <br /><br />----- Original meddelelse -----<br /><blockquote class="webmail-quote" style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: #000000 2px solid; margin-right: 0px"><b>Fra:</b> Alexandre Julliard <julliard@winehq.org><br /><b>Til:</b> Peter Dons Tychsen <donpedro@tdcadsl.dk><br /><b>Cc:</b> wine-devel@winehq.org<br /><b>Dato:</b> Tor, 10. sep 2009 22:20<br /><b>Emne:</b> Re: ntdll: Do not accept device control requests with invalid and/or incompa tible handles<br /><br /> Peter Dons Tychsen <donpedro@tdcadsl.dk> writes:<br /><br />> Thanks for the comments.<br />> Not sure i understand them though.<br />><br />> The whole point of the test was to test what happens when you use a wrong<br />> handle. The actual bug i fixed was that it was possible to for programs<br />> to send invalid handles to IoControl. Cygwin was infact sending handles<br />> to ntdll.dll which originated from GetStdHandle().<br />><br />> So i think using this API for testing is relevant, as the point of the<br />> test is to verify that handles of the completely wrong class are<br />> rejected, and not just "bad handles".<br /><br />Yes, but then you should explicitly construct and test both kinds of<br />handles. Using GetStdHandle will either be a wrong class or a bad handle<br />depending on whether stdio is to a file or to a console, so you don't<br />really know which case you are testing. The remapping of console handles<br />happens in kernel32, not in ntdll, so it doesn't really make sense to<br />pass the result of GetStdHandle straight to ntdll.<br /><br />-- <br />Alexandre Julliard<br />julliard@winehq.org<br /></blockquote>
</div>
</body>
</html>