summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2007-12-17 16:55:35 +0000
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2007-12-17 16:55:35 +0000
commita7e8065a32e0151ef995d696881d4d2ecf27fd33 (patch)
tree6bbe7cac277caf919e61f1a0c6c856165939bad6
parentfdf9cb58ce03df58c25dc9dd0c9f939abd343183 (diff)
downloadxine-lib-a7e8065a32e0151ef995d696881d4d2ecf27fd33.tar.gz
xine-lib-a7e8065a32e0151ef995d696881d4d2ecf27fd33.tar.bz2
Fix an off-by-one error concerning UTF-8-encoded BOMs.
-rw-r--r--src/xine-utils/xmllexer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xine-utils/xmllexer.c b/src/xine-utils/xmllexer.c
index 75362e10d..047dbb1a6 100644
--- a/src/xine-utils/xmllexer.c
+++ b/src/xine-utils/xmllexer.c
@@ -106,7 +106,7 @@ void lexer_init(const char * buf, int size) {
lex_convert (buf + 4, size - 4, UTF32BE);
else if (size >= 4 && !memcmp (buf, boms, 4))
lex_convert (buf + 4, size - 4, UTF32LE);
- else if (size >= 3 && !memcmp (buf, bom_utf8, 4))
+ else if (size >= 3 && !memcmp (buf, bom_utf8, 3))
{
lexbuf += 3;
lexbuf_size -= 3;