]> granicus.if.org Git - libexpat/commitdiff
Fix SF bug #123767: segfault on UTF-8 BOM.
authorFred L. Drake, Jr. <fdrake@users.sourceforge.net>
Fri, 16 Feb 2001 18:12:49 +0000 (18:12 +0000)
committerFred L. Drake, Jr. <fdrake@users.sourceforge.net>
Fri, 16 Feb 2001 18:12:49 +0000 (18:12 +0000)
(Reported with fix by Bruce Kaskel.)

expat/lib/xmltok.c

index 99797838580304911207d8a622baaa2d4b7dcedd..55b63a7e1395b2d220abcccfb4ccc976805fc8b3 100644 (file)
@@ -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;
       }