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 





Reply via email to