xml parser: skip UTF-8 BOM header, fixes #2644
This commit is contained in:
parent
b98e688f57
commit
3c0a279825
1 changed files with 4 additions and 0 deletions
|
@ -833,6 +833,10 @@ htsmsg_xml_deserialize(char *src, char *errbuf, size_t errbufsize)
|
|||
xp.xp_encoding = XML_ENCODING_UTF8;
|
||||
LIST_INIT(&xp.xp_namespaces);
|
||||
|
||||
/* check for UTF-8 BOM */
|
||||
if(src[0] == 0xef && src[1] == 0xbb && src[2] == 0xbf)
|
||||
memmove(src, src + 3, strlen(src) - 2);
|
||||
|
||||
if((src = htsmsg_parse_prolog(&xp, src)) == NULL)
|
||||
goto err;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue