Possible WideCharToMultiByte CP_UNIXCP bug

Gabriel Ivăncescu gabrielopcode at gmail.com
Wed Sep 4 09:32:59 CDT 2019


On 9/4/19 5:32 PM, Alexandre Julliard wrote:
> Gabriel Ivăncescu <gabrielopcode at gmail.com> writes:
> 
>> The problem seems to be in the fact that the 'used' parameter is
>> *never* set in this case. It passes 'used ? &used_tmp : NULL' and then
>> breaks out of the switch -- and the 'if (used) *used = used_tmp;'
>> statement only applies in the default case of the switch. So I'm
>> basically using an uninitialized variable.
>>
>> Is this intended, or a bug?
> 
> It's a bug, thanks for catching it.
> 

I've sent some patches to fix this and simplify CP_UNIXCP for callers.



More information about the wine-devel mailing list