[PATCH 2/2] oledb32: GetConversionSize shouldn't fail for null variants.

Nikolay Sivov bunglehead at gmail.com
Tue Dec 22 03:28:17 CST 2015


On 22.12.2015 12:07, Alistair Leslie-Hughes wrote:
> Hi Huw,
> 
> On 22/12/15 20:03, Huw Davies wrote:
>> On Tue, Dec 22, 2015 at 06:32:04PM +1100, Alistair Leslie-Hughes wrote:
>>> diff --git a/dlls/oledb32/tests/convert.c b/dlls/oledb32/tests/convert.c
>>> index a785457..55539f9 100644
>>> --- a/dlls/oledb32/tests/convert.c
>>> +++ b/dlls/oledb32/tests/convert.c
>>> @@ -2627,6 +2627,33 @@ static void test_getconversionsize(void)
>>>       ok(hr == S_OK, "got 0x%08x\n", hr);
>>>       VariantClear(&var);
>>>
>>> +    dst_len = 78;
>>> +    V_VT(&var) = VT_NULL;
>>> +    hr = IDataConvert_GetConversionSize(convert, DBTYPE_VARIANT,
>>> DBTYPE_WSTR, NULL, &dst_len, &var);
>>> +    ok(hr == S_OK, "got 0x%08x\n", hr);
>>
>> You should test dst_len after return.  Likewise below.
>>
> No, there is no point. On windows it returns a magic number of 110, and
> that is why previous patches were rejected, since I had those checks in
> there.  The return value doesn't matter in the case of a NULL Variant.

With previous patches my question was to test actual string this variant
is converted too, maybe it's not that magic after all.

> 
> Best Regards
>  Alistair Leslie-Hughes
> 
> 




More information about the wine-devel mailing list