msxml3: IVBSAXContentHandler::startElement() should also check *namespaceURI for NULL.

Like ISAXContentHandler::startElement() does.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2021-05-20 19:42:42 +03:00 committed by Alexandre Julliard
parent bbfa8d17f8
commit 13b1e36de0
2 changed files with 2 additions and 6 deletions

View File

@ -2159,8 +2159,8 @@ static HRESULT WINAPI VBSAXContentHandler_startElement(IVBSAXContentHandler *ifa
TRACE("(%p)->(%p %p %p %p)\n", This, namespaceURI, localName, QName, attrs);
if (!namespaceURI || !localName || !QName)
return E_POINTER;
if (!namespaceURI || !*namespaceURI || !localName || !QName)
return E_INVALIDARG;
TRACE("(%s %s %s)\n", debugstr_w(*namespaceURI), debugstr_w(*localName), debugstr_w(*QName));

View File

@ -3852,7 +3852,6 @@ static void test_mxwriter_startendelement(void)
bstr_ab = SysAllocString(L"a:b");
hr = IVBSAXContentHandler_startElement(vb_content, &bstr_null, &bstr_empty, &bstr_b, NULL);
todo_wine
ok(hr == E_INVALIDARG, "got %08x\n", hr);
hr = IVBSAXContentHandler_startElement(vb_content, &bstr_empty, &bstr_b, &bstr_empty, NULL);
@ -3862,7 +3861,6 @@ todo_wine
hr = IMXWriter_get_output(writer, &dest);
ok(hr == S_OK, "got %08x\n", hr);
ok(V_VT(&dest) == VT_BSTR, "got %d\n", V_VT(&dest));
todo_wine
ok(!lstrcmpW(L"<>", V_BSTR(&dest)), "got wrong content %s\n", wine_dbgstr_w(V_BSTR(&dest)));
VariantClear(&dest);
@ -3873,7 +3871,6 @@ todo_wine
hr = IMXWriter_get_output(writer, &dest);
ok(hr == S_OK, "got %08x\n", hr);
ok(V_VT(&dest) == VT_BSTR, "got %d\n", V_VT(&dest));
todo_wine
ok(!lstrcmpW(L"<><b>", V_BSTR(&dest)), "got wrong content %s\n", wine_dbgstr_w(V_BSTR(&dest)));
VariantClear(&dest);
@ -3899,7 +3896,6 @@ todo_wine
hr = IMXWriter_get_output(writer, &dest);
ok(hr == S_OK, "got %08x\n", hr);
ok(V_VT(&dest) == VT_BSTR, "got %d\n", V_VT(&dest));
todo_wine
ok(!lstrcmpW(L"<><b></b>", V_BSTR(&dest)), "got wrong content %s\n", wine_dbgstr_w(V_BSTR(&dest)));
VariantClear(&dest);