OLEAUT32: fix concatenation of VT_BSTR and non-VT_BSTR in VarCat

Alex Villaci­s Lasso a_villacis at palosanto.com
Mon Jan 24 11:02:51 CST 2005


This bug arose while testing why text was being corrupted in the 
VisualBasic application I was using for testing the Unicode 
implementation for builtin ODBC. I found that in the VarCat function in 
variant.c, a "bstrvar" VARIANT was declared, but its V_VT was not being 
initialized. In addition, neither VariantChangeTypeEx or VariantCopy 
took the trouble of setting the correct value for the destination 
VARIANT, so this temporary remained with a bogus V_VT which was 
propagated up to the application. From the VARIANT tests in the tests/ 
directory, it seems that setting the destination V_VT is not the 
responsibility of VariantCopy, since all the test set it explicitly. I 
thought that VariantChangeTypeEx would be an appropriate place, but this 
crashed another dialog on the same VisualBasic application. So the 
assignment ended up in VarCat.

Changelog:
* VarCat now explicitly sets V_VT of temporary before calling 
VariantChangeTypeEx

-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-oleaut32-variant-bstr.patch
Type: text/x-patch
Size: 691 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050124/d06026d0/wine-oleaut32-variant-bstr.bin


More information about the wine-patches mailing list