Hello,
I think I found a (possible) little issue in the patch:
If one would pass a VARIANT of incorrect type to the xslprocessor_put_input() function (say type BSTR), the first type checks fail and leave hr uninitialised; in case it happened to have the value S_OK the other if block is skipped - assigning the uninitialised input_node;
static HRESULT WINAPI xslprocessor_put_input( IXSLProcessor *iface, VARIANT input ) { xslprocessor *This = impl_from_IXSLProcessor( iface ); + IXMLDOMNode *input_node; + HRESULT hr; (assume hr happens to be S_OK)
- FIXME("(%p): stub\n", This); - return E_NOTIMPL; + TRACE("(%p)->(%s)\n", This, debugstr_variant(&input)); + + /* try IXMLDOMNode directly first */ + if (V_VT(&input) == VT_UNKNOWN) + hr = IUnknown_QueryInterface(V_UNKNOWN(&input), &IID_IXMLDOMNode, (void**)&input_node); + else if (V_VT(&input) == VT_DISPATCH) + hr = IDispatch_QueryInterface(V_DISPATCH(&input), &IID_IXMLDOMNode, (void**)&input_node); (both false)
+ + if (hr != S_OK) + { //... + } (skipped)
+ + if (hr == S_OK) + { + if (This->input) IXMLDOMNode_Release(This->input); + This->input = input_node; + } (executed, assigning garbage to This->input)
+ + return hr; }
HTH, Joris