From: <li...@yo...> - 2007-12-17 16:56:03
|
# HG changeset patch # User Darren Salt <li...@yo...> # Date 1197910535 0 # Node ID 0fc19b2fcbe672867c6a2d912b91b2ee9060051b # Parent e0819c1c624a63682e538e7e0935afb7d59ef1a8 Fix an off-by-one error concerning UTF-8-encoded BOMs. diff -r 0fc19b2fcbe672867c6a2d912b91b2ee9060051b -r e0819c1c624a63682e538e7e0935afb7d59ef1a8 src/xine-utils/xmllexer.c --- a/src/xine-utils/xmllexer.c Mon Dec 17 16:55:35 2007 +0000 +++ b/src/xine-utils/xmllexer.c Sun Dec 16 14:23:25 2007 +0000 @@ -106,7 +106,7 @@ void lexer_init(const char * buf, int si 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; |