[Expat-checkins] CVS: expat/lib xmlparse.c,1.24,1.25
Fred L. Drake
fdrake@users.sourceforge.net
Fri Nov 16 12:58:02 2001
Update of /cvsroot/expat/expat/lib
In directory usw-pr-cvs1:/tmp/cvs-serv4072/lib
Modified Files:
xmlparse.c
Log Message:
prologProcessor(): Avoid segfault by making sure "next" is initialized;
fix suggested by Tim Crook.
This fixes (I think!) SF bug #226514.
Removed extra "break".
Index: xmlparse.c
===================================================================
RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** xmlparse.c 2001/10/01 20:52:54 1.24
--- xmlparse.c 2001/11/16 20:57:30 1.25
***************
*** 2564,2568 ****
const char **nextPtr)
{
! const char *next;
int tok = XmlPrologTok(encoding, s, end, &next);
return doProlog(parser, encoding, s, end, tok, next, nextPtr);
--- 2564,2568 ----
const char **nextPtr)
{
! const char *next = s;
int tok = XmlPrologTok(encoding, s, end, &next);
return doProlog(parser, encoding, s, end, tok, next, nextPtr);
***************
*** 3474,3478 ****
if (!poolAppend(pool, enc, ptr, next))
return XML_ERROR_NO_MEMORY;
- break;
break;
case XML_TOK_TRAILING_CR:
--- 3474,3477 ----