1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 20:06:18 +00:00

msxml3: Use correct string length in saxreader_get_cdata_chunk.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2017-10-05 14:59:56 +02:00 committed by Alexandre Julliard
parent 1a114c9f4b
commit afdf7491ef

View File

@ -1972,6 +1972,7 @@ static BSTR saxreader_get_cdata_chunk(const xmlChar *str, int len)
BSTR bstr = bstr_from_xmlCharN(str, len), ret;
WCHAR *ptr;
len = SysStringLen(bstr);
ptr = bstr + len - 1;
while ((*ptr == '\r' || *ptr == '\n') && ptr >= bstr)
ptr--;
@ -2038,7 +2039,7 @@ static void libxml_cdatablock(void *ctx, const xmlChar *value, int len)
while (i < len)
{
if (value[i] != '\r' && value[i] != '\n') break;
i++;
i++;
}
end = &value[i];