msxml3: Reader shouldn't depend on input being properly allocated BSTR string.

This commit is contained in:
Nikolay Sivov 2012-06-17 23:51:09 +04:00 committed by Alexandre Julliard
parent 16ef649b5f
commit 7cbd9dcdc3
1 changed files with 3 additions and 1 deletions

View File

@ -2151,6 +2151,8 @@ static HRESULT internal_parseBuffer(saxreader *This, const char *buffer, int siz
saxlocator *locator;
HRESULT hr;
TRACE("(%p)->(%p %d)\n", This, buffer, size);
hr = SAXLocator_create(This, &locator, vbInterface);
if (FAILED(hr))
return hr;
@ -2441,7 +2443,7 @@ static HRESULT internal_parse(
{
case VT_BSTR:
hr = internal_parseBuffer(This, (const char*)V_BSTR(&varInput),
SysStringByteLen(V_BSTR(&varInput)), vbInterface);
strlenW(V_BSTR(&varInput))*sizeof(WCHAR), vbInterface);
break;
case VT_ARRAY|VT_UI1: {
void *pSAData;