mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 16:34:11 +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:
parent
1a114c9f4b
commit
afdf7491ef
|
@ -1972,6 +1972,7 @@ static BSTR saxreader_get_cdata_chunk(const xmlChar *str, int len)
|
||||||
BSTR bstr = bstr_from_xmlCharN(str, len), ret;
|
BSTR bstr = bstr_from_xmlCharN(str, len), ret;
|
||||||
WCHAR *ptr;
|
WCHAR *ptr;
|
||||||
|
|
||||||
|
len = SysStringLen(bstr);
|
||||||
ptr = bstr + len - 1;
|
ptr = bstr + len - 1;
|
||||||
while ((*ptr == '\r' || *ptr == '\n') && ptr >= bstr)
|
while ((*ptr == '\r' || *ptr == '\n') && ptr >= bstr)
|
||||||
ptr--;
|
ptr--;
|
||||||
|
@ -2038,7 +2039,7 @@ static void libxml_cdatablock(void *ctx, const xmlChar *value, int len)
|
||||||
while (i < len)
|
while (i < len)
|
||||||
{
|
{
|
||||||
if (value[i] != '\r' && value[i] != '\n') break;
|
if (value[i] != '\r' && value[i] != '\n') break;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
end = &value[i];
|
end = &value[i];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue