[resent] Fix some hackish usages of WideCharToMultiByte
mail at colinfinck.de
Thu Jul 31 14:22:15 CDT 2008
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
Therefore this parameter is unusable as a length variable for
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.
More information about the wine-devel