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

List:       wine-devel
Subject:    Re: [resent] Fix some hackish usages of WideCharToMultiByte
From:       "Colin Finck" <mail () colinfinck ! de>
Date:       2008-07-31 19:22:15
Message-ID: g6t3ep$qji$1 () ger ! gmane ! org
[Download RAW message or body]

Alexandre Julliard wrote:
> It would be cleaner to pass the actual buffer size to the function, it's
> complex enough that it would be easy to inadvertently break the
> guarantee that the allocated space is large enough.

We already pass a length pointer to that 
"convert_PCREDENTIALW_to_PCREDENTIALA" function, but its value is zeroed 
before the actual conversion takes place.
Its value is increased while the length of all strings is determined during 
the conversion.
Therefore this parameter is unusable as a length variable for 
WideCharToMultiByte.

So all in all, getting that function to use a passed length instead of 
0x7FFFFFFF requires rewriting most code, which currently calls it, and I 
don't feel like doing this now ;-)
As the rest of the patch is already applied to HEAD, I'd suggest we drop 
that advapi32/cred.c change for the moment.

The rest of my patches are independent from it anyway.
If there are any more problems with them, please let me know.

Best regards,

Colin 





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

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