From: Fred L. Drake, Jr. Date: Fri, 16 Feb 2001 18:12:49 +0000 (+0000) Subject: Fix SF bug #123767: segfault on UTF-8 BOM. X-Git-Tag: R_1_95_2~87 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a6823aa552000ebaea70c6dbfbbc0f69b031afea;p=libexpat Fix SF bug #123767: segfault on UTF-8 BOM. (Reported with fix by Bruce Kaskel.) --- diff --git a/expat/lib/xmltok.c b/expat/lib/xmltok.c index 99797838..55b63a7e 100644 --- a/expat/lib/xmltok.c +++ b/expat/lib/xmltok.c @@ -4,7 +4,7 @@ See the file COPYING for copying permission. */ static char RCSId[] - = "$Header: /cvsroot/expat/expat/lib/xmltok.c,v 1.4 2000/09/29 14:57:45 coopercc Exp $"; + = "$Header: /cvsroot/expat/expat/lib/xmltok.c,v 1.5 2000/10/22 19:20:23 coopercc Exp $"; #ifdef COMPILED_FROM_DSP # include "winconfig.h" @@ -1500,6 +1500,7 @@ int initScan(const ENCODING **encodingTable, if (ptr + 2 == end) return XML_TOK_PARTIAL; if ((unsigned char)ptr[2] == 0xBF) { + *nextTokPtr = ptr + 3; *encPtr = encodingTable[UTF_8_ENC]; return XML_TOK_BOM; }