VariantCopy clears existing contents of pvargDest and thus requires it contain a valid (possibly-empty) VARIANT, not uninitialized garbage.
If a failure still occurs, propagate the HRESULT to GetAll*CustData.
Signed-off-by: Kevin Puetz PuetzKevinA@JohnDeere.com --- dlls/oleaut32/typelib.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 2f7ce53b1c..6dbd8c39b2 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -5290,6 +5290,7 @@ static HRESULT TLB_copy_all_custdata(const struct list *custdata_list, CUSTDATA TLBCustData *pCData; unsigned int ct; CUSTDATAITEM *cdi; + HRESULT hr = S_OK;
ct = list_count(custdata_list);
@@ -5302,11 +5303,13 @@ static HRESULT TLB_copy_all_custdata(const struct list *custdata_list, CUSTDATA cdi = pCustData->prgCustData; LIST_FOR_EACH_ENTRY(pCData, custdata_list, TLBCustData, entry){ cdi->guid = *TLB_get_guid_null(pCData->guid); - VariantCopy(&cdi->varValue, &pCData->data); + VariantInit(&cdi->varValue); + hr = VariantCopy(&cdi->varValue, &pCData->data); + if(FAILED(hr)) break; ++cdi; }
- return S_OK; + return hr; }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=76630
Your paranoid android.
=== debiant (build log) ===
../../../../wine/dlls/oleaut32/tests/typelib.c:5776:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5789:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5804:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5817:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5832:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5845:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5860:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5938:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5954:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5955:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5974:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5975:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5977:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5978:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5999:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:6000:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:6002:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:6003:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:6005:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:6006:9: error: initializer element is not computable at load time Task: The win32 Wine build failed
=== debiant (build log) ===
../../../../wine/dlls/oleaut32/tests/typelib.c:4921:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5565:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5579:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5591:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5604:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5620:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5640:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5665:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5685:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5697:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5709:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5721:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5733:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5745:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5758:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5776:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5781:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5789:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5795:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5804:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5809:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5817:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5823:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5832:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5837:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5845:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5851:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5860:24: error: empty scalar initializer ../../../../wine/dlls/oleaut32/tests/typelib.c:5868:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5938:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5954:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5974:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5977:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:5999:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:6002:9: error: initializer element is not computable at load time ../../../../wine/dlls/oleaut32/tests/typelib.c:6005:9: error: initializer element is not computable at load time Task: The wow64 Wine build failed