Commit 064edd2d authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

webservices: Avoid decoding a nul character reference.

parent c11d931e
......@@ -1166,6 +1166,8 @@ static HRESULT parse_name( const unsigned char *str, unsigned int len,
static int codepoint_to_utf8( int cp, unsigned char *dst )
{
if (!cp)
return -1;
if (cp < 0x80)
{
*dst = cp;
......
......@@ -3610,6 +3610,7 @@ static void test_entities(void)
static const char str25[] = "<t>&#xfffe;</t>";
static const char str26[] = "<t>&#xffff;</t>";
static const char str27[] = "<t>&LT;</t>";
static const char str28[] = "<t>&#x0;</t>";
static const char res4[] = {0xea, 0xaa, 0xaa, 0x00};
static const char res5[] = {0xf2, 0xaa, 0xaa, 0xaa, 0x00};
static const char res21[] = {0xed, 0x9f, 0xbf, 0x00};
......@@ -3649,6 +3650,7 @@ static void test_entities(void)
{ str25, WS_E_INVALID_FORMAT },
{ str26, WS_E_INVALID_FORMAT },
{ str27, WS_E_INVALID_FORMAT },
{ str28, WS_E_INVALID_FORMAT },
};
HRESULT hr;
WS_XML_READER *reader;
......
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