From kwaclaw at users.sourceforge.net Thu Nov 24 15:15:30 2005 From: kwaclaw at users.sourceforge.net (Karl Waclawek) Date: Thu, 24 Nov 2005 15:15:30 +0100 (CET) Subject: [Expat-checkins] expat/lib xmlparse.c,1.148,1.149 Message-ID: <20051124141530.578E21E4090@bag.python.org> Update of /cvsroot/expat/expat/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32129 Modified Files: xmlparse.c Log Message: Fix for bug # 1271642. Index: xmlparse.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v retrieving revision 1.148 retrieving revision 1.149 diff -u -d -r1.148 -r1.149 --- xmlparse.c 15 Jun 2005 14:24:26 -0000 1.148 +++ xmlparse.c 24 Nov 2005 14:15:22 -0000 1.149 @@ -4879,9 +4879,8 @@ return XML_ERROR_NO_MEMORY; entity = (ENTITY *)lookup(&dtd->generalEntities, name, 0); poolDiscard(&temp2Pool); - /* first, determine if a check for an existing declaration is needed; - if yes, check that the entity exists, and that it is internal, - otherwise call the default handler (if called from content) + /* First, determine if a check for an existing declaration is needed; + if yes, check that the entity exists, and that it is internal. */ if (pool == &dtd->pool) /* are we called from prolog? */ checkEntityDecl = @@ -4900,13 +4899,16 @@ return XML_ERROR_ENTITY_DECLARED_IN_PE; } else if (!entity) { - /* cannot report skipped entity here - see comments on - skippedEntityHandler + /* Cannot report skipped entity here - see comments on + skippedEntityHandler. if (skippedEntityHandler) skippedEntityHandler(handlerArg, name, 0); */ + /* Cannot call the default handler because this would be + out of sync with the call to the startElementHandler. if ((pool == &tempPool) && defaultHandler) reportDefault(parser, enc, ptr, next); + */ break; } if (entity->open) { From kwaclaw at users.sourceforge.net Sun Nov 27 22:36:23 2005 From: kwaclaw at users.sourceforge.net (Karl Waclawek) Date: Sun, 27 Nov 2005 22:36:23 +0100 (CET) Subject: [Expat-checkins] expat make-release.sh,1.8,1.9 Message-ID: <20051127213623.BC1051E4010@bag.python.org> Update of /cvsroot/expat/expat In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29848 Modified Files: make-release.sh Log Message: Changed back to anonymous CVS access. Index: make-release.sh =================================================================== RCS file: /cvsroot/expat/expat/make-release.sh,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- make-release.sh 24 Sep 2004 15:19:11 -0000 1.8 +++ make-release.sh 27 Nov 2005 21:36:15 -0000 1.9 @@ -7,8 +7,8 @@ # Note: tagname may be HEAD to just grab the head revision (e.g. for testing) # -CVSROOT=':ext:cvs.libexpat.org:/cvsroot/expat' -#CVSROOT=':pserver:anonymous at cvs.libexpat.org:/cvsroot/expat' +#CVSROOT=':ext:cvs.libexpat.org:/cvsroot/expat' +CVSROOT=':pserver:anonymous at cvs.libexpat.org:/cvsroot/expat' if test $# != 1; then echo "USAGE: $0 tagname" From kwaclaw at users.sourceforge.net Sun Nov 27 22:50:56 2005 From: kwaclaw at users.sourceforge.net (Karl Waclawek) Date: Sun, 27 Nov 2005 22:50:56 +0100 (CET) Subject: [Expat-checkins] expat Changes,1.44,1.45 Message-ID: <20051127215056.2BB5D1E400F@bag.python.org> Update of /cvsroot/expat/expat In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv403 Modified Files: Changes Log Message: In preparation for next release. Index: Changes =================================================================== RCS file: /cvsroot/expat/expat/Changes,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- Changes 29 Jan 2005 05:11:13 -0000 1.44 +++ Changes 27 Nov 2005 21:50:47 -0000 1.45 @@ -4,6 +4,9 @@ - Report XML_NS setting via XML_GetFeatureList(). - Fixed headers for use from C++. - Updated to use libtool 1.5.10 (the most recent). + - Added support for AmigaOS. + - Some mostly minor bug fixes. SF issues include: 1006708, + 1021776, 1023646, 1114960, 1156398, 1221160, 1271642. Release 1.95.8 Fri Jul 23 2004 - Major new feature: suspend/resume. Handlers can now request From kwaclaw at users.sourceforge.net Mon Nov 28 19:42:57 2005 From: kwaclaw at users.sourceforge.net (Karl Waclawek) Date: Mon, 28 Nov 2005 19:42:57 +0100 (CET) Subject: [Expat-checkins] expat/win32 README.txt,1.4,1.5 Message-ID: <20051128184257.CA94B1E4002@bag.python.org> Update of /cvsroot/expat/expat/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21132 Modified Files: README.txt Log Message: Added instructions for creating MinGW libraries. Index: README.txt =================================================================== RCS file: /cvsroot/expat/expat/win32/README.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- README.txt 30 Apr 2004 17:28:05 -0000 1.4 +++ README.txt 28 Nov 2005 18:42:49 -0000 1.5 @@ -16,6 +16,16 @@ * MS Visual Studio .NET 2002, 2003: The VC++ 6 workspace file (expat.dsw) and project files (.dsp) can be opened and imported in VS.NET without problems. + +* Creating MinGW dynamic libraries from MS VC++ DLLs: + + On the command line, execute these steps: + pexports libexpat.dll > expat.def + pexports libexpatw.dll > expatw.def + dlltool -d expat.def -l libexpat.a + dlltool -d expatw.def -l libexpatw.a + + The *.a files are mingw libraries. * Special note about MS VC++ and runtime libraries: @@ -60,4 +70,3 @@ An application linking to the static libraries must have the global macro XML_STATIC defined. - \ No newline at end of file From kwaclaw at users.sourceforge.net Mon Nov 28 21:00:59 2005 From: kwaclaw at users.sourceforge.net (Karl Waclawek) Date: Mon, 28 Nov 2005 21:00:59 +0100 (CET) Subject: [Expat-checkins] expat/doc reference.html,1.65,1.66 Message-ID: <20051128200059.C0D711E4002@bag.python.org> Update of /cvsroot/expat/expat/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4969 Modified Files: reference.html Log Message: Added a note about possible integer overflow when using large input buffers. Index: reference.html =================================================================== RCS file: /cvsroot/expat/expat/doc/reference.html,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- reference.html 30 Jan 2005 05:44:46 -0000 1.65 +++ reference.html 28 Nov 2005 20:00:50 -0000 1.66 @@ -984,14 +984,22 @@
To state the obvious: the three parsing functions XML_Parse
,
XML_ParseBuffer
and
-XML_GetBuffer
must not be
-called from within a handler unless they operate on a separate parser
-instance, that is, one that did not call the handler. For example, it
-is OK to call the parsing functions from within an
-XML_ExternalEntityRefHandler
, if they apply to the parser
-created by must not be called from within a handler
+unless they operate on a separate parser instance, that is, one that
+did not call the handler. For example, it is OK to call the parsing
+functions from within an
XML_ExternalEntityRefHandler
,
+if they apply to the parser created by
+XML_ExternalEntityParserCreate
.
Note: the len
argument passed to these functions
+should be considerably less than the maximum value for an integer,
+as it could create an integer overflow situation if the added
+lengths of a buffer and the unprocessed portion of the previous buffer
+exceed the maximum integer value. Input data at the end of a buffer
+will remain unprocessed if it is part of an XML token for which the
+end is not part of that buffer.
enum XML_Status XMLCALL XML_Parse(XML_Parser p, From kwaclaw at users.sourceforge.net Mon Nov 28 21:02:44 2005 From: kwaclaw at users.sourceforge.net (Karl Waclawek) Date: Mon, 28 Nov 2005 21:02:44 +0100 (CET) Subject: [Expat-checkins] expat/lib xmlparse.c, 1.149, 1.150 xmltok_impl.c, 1.10, 1.11 Message-ID: <20051128200244.7AAF21E4002@bag.python.org> Update of /cvsroot/expat/expat/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5369 Modified Files: xmlparse.c xmltok_impl.c Log Message: Added int type casts for 64 bit portability, to avoid compiler warnings. Works for MS VC++, not tested on other platforms. Index: xmlparse.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v retrieving revision 1.149 retrieving revision 1.150 diff -u -d -r1.149 -r1.150 --- xmlparse.c 24 Nov 2005 14:15:22 -0000 1.149 +++ xmlparse.c 28 Nov 2005 20:02:36 -0000 1.150 @@ -1606,9 +1606,9 @@ if (len > bufferLim - bufferEnd) { /* FIXME avoid integer overflow */ - int neededSize = len + (bufferEnd - bufferPtr); + int neededSize = len + (int)(bufferEnd - bufferPtr); #ifdef XML_CONTEXT_BYTES - int keep = bufferPtr - buffer; + int keep = (int)(bufferPtr - buffer); if (keep > XML_CONTEXT_BYTES) keep = XML_CONTEXT_BYTES; @@ -1617,7 +1617,7 @@ if (neededSize <= bufferLim - buffer) { #ifdef XML_CONTEXT_BYTES if (keep < bufferPtr - buffer) { - int offset = (bufferPtr - buffer) - keep; + int offset = (int)(bufferPtr - buffer) - keep; memmove(buffer, &buffer[offset], bufferEnd - bufferPtr + keep); bufferEnd -= offset; bufferPtr -= offset; @@ -1630,7 +1630,7 @@ } else { char *newBuf; - int bufferSize = bufferLim - bufferPtr; + int bufferSize = (int)(bufferLim - bufferPtr); if (bufferSize == 0) bufferSize = INIT_BUFFER_SIZE; do { @@ -1644,7 +1644,7 @@ bufferLim = newBuf + bufferSize; #ifdef XML_CONTEXT_BYTES if (bufferPtr) { - int keep = bufferPtr - buffer; + int keep = (int)(bufferPtr - buffer); if (keep > XML_CONTEXT_BYTES) keep = XML_CONTEXT_BYTES; memcpy(newBuf, &bufferPtr[-keep], bufferEnd - bufferPtr + keep); @@ -1763,7 +1763,7 @@ XML_GetCurrentByteCount(XML_Parser parser) { if (eventEndPtr && eventPtr) - return eventEndPtr - eventPtr; + return (int)(eventEndPtr - eventPtr); return 0; } @@ -1772,8 +1772,8 @@ { #ifdef XML_CONTEXT_BYTES if (eventPtr && buffer) { - *offset = eventPtr - buffer; - *size = bufferEnd - buffer; + *offset = (int)(eventPtr - buffer); + *size = (int)(bufferEnd - buffer); return buffer; } #endif /* defined XML_CONTEXT_BYTES */ @@ -2326,12 +2326,12 @@ XmlConvert(enc, &fromPtr, rawNameEnd, (ICHAR **)&toPtr, (ICHAR *)tag->bufEnd - 1); - convLen = toPtr - (XML_Char *)tag->buf; + convLen = (int)(toPtr - (XML_Char *)tag->buf); if (fromPtr == rawNameEnd) { tag->name.strLen = convLen; break; } - bufSize = (tag->bufEnd - tag->buf) << 1; + bufSize = (int)(tag->bufEnd - tag->buf) << 1; { char *temp = (char *)REALLOC(tag->buf, bufSize); if (temp == NULL) @@ -2519,12 +2519,12 @@ ICHAR *dataPtr = (ICHAR *)dataBuf; XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)dataBufEnd); characterDataHandler(handlerArg, dataBuf, - dataPtr - (ICHAR *)dataBuf); + (int)(dataPtr - (ICHAR *)dataBuf)); } else characterDataHandler(handlerArg, (XML_Char *)s, - (XML_Char *)end - (XML_Char *)s); + (int)((XML_Char *)end - (XML_Char *)s)); } else if (defaultHandler) reportDefault(parser, enc, s, end); @@ -2549,7 +2549,7 @@ XmlConvert(enc, &s, next, &dataPtr, (ICHAR *)dataBufEnd); *eventEndPP = s; characterDataHandler(handlerArg, dataBuf, - dataPtr - (ICHAR *)dataBuf); + (int)(dataPtr - (ICHAR *)dataBuf)); if (s == next) break; *eventPP = s; @@ -2558,7 +2558,7 @@ else characterDataHandler(handlerArg, (XML_Char *)s, - (XML_Char *)next - (XML_Char *)s); + (int)((XML_Char *)next - (XML_Char *)s)); } else if (defaultHandler) reportDefault(parser, enc, s, next); @@ -3129,7 +3129,7 @@ XmlConvert(enc, &s, next, &dataPtr, (ICHAR *)dataBufEnd); *eventEndPP = next; characterDataHandler(handlerArg, dataBuf, - dataPtr - (ICHAR *)dataBuf); + (int)(dataPtr - (ICHAR *)dataBuf)); if (s == next) break; *eventPP = s; @@ -3138,7 +3138,7 @@ else characterDataHandler(handlerArg, (XML_Char *)s, - (XML_Char *)next - (XML_Char *)s); + (int)((XML_Char *)next - (XML_Char *)s)); } else if (defaultHandler) reportDefault(parser, enc, s, next); @@ -4014,7 +4014,7 @@ next - enc->minBytesPerChar); if (declEntity) { declEntity->textPtr = poolStart(&dtd->entityValuePool); - declEntity->textLen = poolLength(&dtd->entityValuePool); + declEntity->textLen = (int)(poolLength(&dtd->entityValuePool)); poolFinish(&dtd->entityValuePool); if (entityDeclHandler) { *eventEndPP = s; @@ -4699,7 +4699,7 @@ if (result == XML_ERROR_NONE) { if (textEnd != next && ps_parsing == XML_SUSPENDED) { - entity->processed = next - textStart; + entity->processed = (int)(next - textStart); processor = internalEntityProcessor; } else { @@ -4745,7 +4745,7 @@ if (result != XML_ERROR_NONE) return result; else if (textEnd != next && ps_parsing == XML_SUSPENDED) { - entity->processed = next - (char *)entity->textPtr; + entity->processed = (int)(next - (char *)entity->textPtr); return result; } else { @@ -5208,12 +5208,12 @@ ICHAR *dataPtr = (ICHAR *)dataBuf; XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)dataBufEnd); *eventEndPP = s; - defaultHandler(handlerArg, dataBuf, dataPtr - (ICHAR *)dataBuf); + defaultHandler(handlerArg, dataBuf, (int)(dataPtr - (ICHAR *)dataBuf)); *eventPP = s; } while (s != end); } else - defaultHandler(handlerArg, (XML_Char *)s, (XML_Char *)end - (XML_Char *)s); + defaultHandler(handlerArg, (XML_Char *)s, (int)((XML_Char *)end - (XML_Char *)s)); } @@ -6095,7 +6095,7 @@ } } if (pool->blocks && pool->start == pool->blocks->s) { - int blockSize = (pool->end - pool->start)*2; + int blockSize = (int)(pool->end - pool->start)*2; pool->blocks = (BLOCK *) pool->mem->realloc_fcn(pool->blocks, (offsetof(BLOCK, s) @@ -6109,7 +6109,7 @@ } else { BLOCK *tem; - int blockSize = pool->end - pool->start; + int blockSize = (int)(pool->end - pool->start); if (blockSize < INIT_BLOCK_SIZE) blockSize = INIT_BLOCK_SIZE; else Index: xmltok_impl.c =================================================================== RCS file: /cvsroot/expat/expat/lib/xmltok_impl.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- xmltok_impl.c 3 Jul 2003 04:01:14 -0000 1.10 +++ xmltok_impl.c 28 Nov 2005 20:02:36 -0000 1.11 @@ -1714,7 +1714,7 @@ ptr += MINBPC(enc); break; default: - return ptr - start; + return (int)(ptr - start); } } }