<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Le 01/09/2011 16:22, Francois Gouget a écrit :
    <blockquote
      cite="mid:alpine.DEB.2.02.1109011614300.18176@amboise.dolphin"
      type="cite">
      <pre wrap="">On Wed, 24 Aug 2011, Eric Pouech wrote:
[...]
</pre>
      <blockquote type="cite">
        <pre wrap="">you can safely provide the patches with protecting WriteConsole and friends
with a if (!is_console_handle(???)) return FALSE; line
</pre>
      </blockquote>
      <pre wrap="">
Would something like the attached patch be ok?
As far as I can see all the other APIs pretty much immediately pass the 
handle to wineserver which I expect will complain if it's not a console 
handle.

Further notes:
 * Performing the 'console handle check' locally would likely be faster 
   but, except for WriteConsole maybe, this should usually be the case 
   and is probably not performance critical anyway.
 * There are a few cases where we check for invalid parameters and 
   return an error before the handle is checked by wineserver. It's 
   possible that in such cases Windows checks the handle first. But 
   unless we know of applications that need the right error code in 
   these corner cases it does not justify adding an explicit check.

</pre>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>

</pre>
    </blockquote>
    actually, a couple of API support the "bare" handles and those
    should be protected (what your patch does)<br>
    otherwise, wineserver iwill fail on them<br>
    this patch looks ok, but you have to reverse the previous one as
    well<br>
    A+<br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Eric Pouech
"The problem with designing something completely foolproof is to underestimate the ingenuity of a complete idiot." (Douglas Adams)
</pre>
  </body>
</html>