Commit 58739825 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

xmllite: Correct allocated destination buffer size.

parent feda40bb
......@@ -711,11 +711,12 @@ static HRESULT readerinput_growraw(xmlreaderinput *readerinput)
return hr;
}
/* grows UTF-16 buffer so it has at least 'length' bytes free on return */
/* grows UTF-16 buffer so it has at least 'length' WCHAR chars free on return */
static void readerinput_grow(xmlreaderinput *readerinput, int length)
{
encoded_buffer *buffer = &readerinput->buffer->utf16;
length *= sizeof(WCHAR);
/* grow if needed, plus 4 bytes to be sure null terminator will fit in */
if (buffer->allocated < buffer->written + length + 4)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment