[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: [PATCH 6/6] kernel32: Invalid console handles for new processes are 0, not INVALID_HANDLE_VALUE.
From:       "Erich E. Hoover" <erich.e.hoover () wine-staging ! com>
Date:       2015-01-21 15:22:44
Message-ID: CAEU2+vrkHs2oYc1G8_TxUCcR0auMXQJ9VOXzJ4qKWas9Frq+iQ () mail ! gmail ! com
[Download RAW message or body]

On Wed, Jan 21, 2015 at 1:37 AM, Alistair Leslie-Hughes
<leslie_alistair@hotmail.com> wrote:
> On 21/01/15 08:51, Erich E. Hoover wrote:
>>
>> Several applications rely on the TEB value for fresh invalid console
>> handles to be zero instead of INVALID_HANDLE_VALUE (fixes Bug #36216
>> and Bug #37914).
>>
>>
>> + · · · ·if ·(!params->hStdOutput ·|| ·params->hStdOutput ·== ·INVALID_HANDLE_VALUE)
>> + · · · · · · · ·params->hStdOutput ·= ·0;
>
>
> The !params->hStdOutput check is redundant since it's already 0. Applies to
> the other places as well.

You need to provide some sort of no-op, otherwise it will try to map
the handle in the next part of that if block:
     else if (VerifyConsoleIoHandle(console_handle_map(params->hStdOutput)))
         params->hStdOutput = console_handle_map(params->hStdOutput);

Best,
Erich



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic