From 4bc54b7225da1a3d378a3095b9e7718d35d799f8 Mon Sep 17 00:00:00 2001 From: "Fred L. Drake, Jr." Date: Fri, 16 Nov 2001 20:57:30 +0000 Subject: [PATCH] prologProcessor(): Avoid segfault by making sure "next" is initialized; fix suggested by Tim Crook. This fixes (I think!) SF bug #226514. Removed extra "break". --- expat/lib/xmlparse.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index 80599cad..9faeab02 100644 --- a/expat/lib/xmlparse.c +++ b/expat/lib/xmlparse.c @@ -2563,7 +2563,7 @@ prologProcessor(XML_Parser parser, const char *end, const char **nextPtr) { - const char *next; + const char *next = s; int tok = XmlPrologTok(encoding, s, end, &next); return doProlog(parser, encoding, s, end, tok, next, nextPtr); } @@ -3474,7 +3474,6 @@ appendAttributeValue(XML_Parser parser, const ENCODING *enc, int isCdata, if (!poolAppend(pool, enc, ptr, next)) return XML_ERROR_NO_MEMORY; break; - break; case XML_TOK_TRAILING_CR: next = ptr + enc->minBytesPerChar; /* fall through */ -- 2.40.0