webservices: Avoid decoding a nul character reference.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c11d931ea3
commit
064edd2d8b
|
@ -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></t>";
|
||||
static const char str26[] = "<t></t>";
|
||||
static const char str27[] = "<t><</t>";
|
||||
static const char str28[] = "<t>�</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;
|
||||
|
|
Loading…
Reference in New Issue