[Expat-checkins] expat/lib xmlparse.c,1.132,1.133
Karl Waclawek
kwaclaw at users.sourceforge.net
Sun May 2 13:31:15 EDT 2004
- Next message: [Expat-checkins] expat/lib expat_external.h, NONE, 1.1 expat.dsp,
1.11, 1.12 expat.h, 1.67, 1.68 expat_static.dsp, 1.3,
1.4 expatw.dsp, 1.4, 1.5 expatw_static.dsp, 1.3, 1.4 xmlrole.c,
1.18, 1.19 xmltok.c, 1.31, 1.32 external.h, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/expat/expat/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24606
Modified Files:
xmlparse.c
Log Message:
Fix for bug #946506: PublicId for DOCTYPE not checked & normalized.
Index: xmlparse.c
===================================================================
RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -d -r1.132 -r1.133
--- xmlparse.c 29 Apr 2004 17:53:34 -0000 1.132
+++ xmlparse.c 2 May 2004 17:31:13 -0000 1.133
@@ -3675,28 +3675,31 @@
case XML_ROLE_DOCTYPE_PUBLIC_ID:
#ifdef XML_DTD
useForeignDTD = XML_FALSE;
+ declEntity = (ENTITY *)lookup(&dtd->paramEntities,
+ externalSubsetName,
+ sizeof(ENTITY));
+ if (!declEntity)
+ return XML_ERROR_NO_MEMORY;
#endif /* XML_DTD */
dtd->hasParamEntityRefs = XML_TRUE;
if (startDoctypeDeclHandler) {
+ if (!XmlIsPublicId(enc, s, next, eventPP))
+ return XML_ERROR_SYNTAX;
doctypePubid = poolStoreString(&tempPool, enc,
s + enc->minBytesPerChar,
next - enc->minBytesPerChar);
if (!doctypePubid)
return XML_ERROR_NO_MEMORY;
+ normalizePublicId((XML_Char *)doctypePubid);
poolFinish(&tempPool);
handleDefault = XML_FALSE;
+ goto alreadyChecked;
}
-#ifdef XML_DTD
- declEntity = (ENTITY *)lookup(&dtd->paramEntities,
- externalSubsetName,
- sizeof(ENTITY));
- if (!declEntity)
- return XML_ERROR_NO_MEMORY;
-#endif /* XML_DTD */
/* fall through */
case XML_ROLE_ENTITY_PUBLIC_ID:
if (!XmlIsPublicId(enc, s, next, eventPP))
return XML_ERROR_SYNTAX;
+ alreadyChecked:
if (dtd->keepProcessing && declEntity) {
XML_Char *tem = poolStoreString(&dtd->pool,
enc,
- Next message: [Expat-checkins] expat/lib expat_external.h, NONE, 1.1 expat.dsp,
1.11, 1.12 expat.h, 1.67, 1.68 expat_static.dsp, 1.3,
1.4 expatw.dsp, 1.4, 1.5 expatw_static.dsp, 1.3, 1.4 xmlrole.c,
1.18, 1.19 xmltok.c, 1.31, 1.32 external.h, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Expat-checkins
mailing list