entities.c


Log

Author Commit Date CI Message
Nick Wellnhofer b0fc67aa 2024-06-15T22:53:55 build: Remove --with-tree configuration option This option would allow for a smaller, but mostly useless minimal build. But it complicates the symbol availability logic in an insane way and requires specialized tools like our custom C parser in doc/apibuild.py. See #717.
Nick Wellnhofer 8318b5a6 2024-06-09T14:22:53 parser: Fix NULL checks for output arguments
Nick Wellnhofer f0d89158 2024-06-01T15:41:43 entities: Unconst predefined entities Partial revert of commit 63ce5f9a. For some reason, Chromium and WebKit set the etype member of predefined entities. This should be fixed first.
Nick Wellnhofer e75e878e 2024-05-20T13:58:22 doc: Update and fix documentation
Nick Wellnhofer 63ce5f9a 2024-04-28T17:32:35 Make some globals const
Nick Wellnhofer ee0c1f87 2024-02-29T14:51:49 fuzz: New tree API fuzzer
Nick Wellnhofer edbf1eb6 2024-03-05T18:07:13 entities: Don't allow null name in xmlNewEntity
Nick Wellnhofer 50816b8d 2024-03-05T18:06:38 entities: Check for illegal entity types in xmlAddEntity
Nick Wellnhofer ab345338 2024-03-05T19:58:17 valid: Report malloc failure in legacy DTD serialization
Nick Wellnhofer fbe10a46 2024-02-01T19:01:57 save: Move DTD serialization code to xmlsave.c
Nick Wellnhofer c2b3294f 2024-01-04T21:20:51 fuzz: Abort on invalid UTF-8 The parser should never generate invalid UTF-8 these days even in recovery mode.
Nick Wellnhofer d025cfbb 2023-12-27T03:53:24 parser: Always copy content from entity to target. Make sure that references from IDs are updated. Note that if there are IDs with the same value in a document, the last one will now be returned. IDs should be unique, but maybe this should be addressed.
Nick Wellnhofer a1f7ecae 2023-12-10T15:25:42 entities: Report malloc failures Fix places where malloc failures aren't reported. Introduce new API function xmlAddEntity that returns separate error codes. Don't invoke global error handler for low-level errors which should be handled by higher layers. Invalid redelcaration warnings will be fixed later.
Nick Wellnhofer 713ded60 2023-10-06T10:43:38 entities: Make xmlFreeEntity public
Nick Wellnhofer 699299ca 2023-09-20T18:54:39 globals: Stop including globals.h
Nick Wellnhofer 9d80a2b1 2023-08-16T19:45:34 entities: Don't change doc when encoding entities doc->encoding shouldn't be touched by xmlEncodeEntitiesInternal.
Nick Wellnhofer ce76ebfd 2022-12-19T20:56:23 entities: Stop counting entities This was only used in the old version of xmlParserEntityCheck.
Nick Wellnhofer 463bbeec 2022-12-19T18:39:45 entities: Rework entity amplification checks This commit implements robust detection of entity amplification attacks, better known as the "billion laughs" attack. We now limit the size of the document after substitution of entities to 10 times the size before expansion. This guarantees linear behavior by definition. There already was a similar check before, but the accounting of "sizeentities" (size of external entities) and "sizeentcopy" (size of all copies created by entity references) wasn't accurate. We also need saturation arithmetic since we're historically limited to "unsigned long" which is 32-bit on many platforms. A maximum of 10 MB of substitutions is always allowed. This should make use cases like DITA work which have caused problems in the past. The old checks based on the number of entities were removed. This is accounted for by adding a fixed cost to each entity reference. Entity amplification checks are now enabled even if XML_PARSE_HUGE is set. This option is mainly used to allow larger text nodes. Most users were unaware that it also disabled entity expansion checks. Some of the limits might be adjusted later. If this change turns out to affect legitimate use cases, we can add a separate parser option to disable the checks. Fixes #294. Fixes #345.
Nick Wellnhofer f34f184f 2022-12-19T15:24:53 entities: Add "flags" member to struct xmlEntity This will hold various flags and eventually replace the "checked" member.
Nick Wellnhofer 2059df53 2022-11-14T22:27:58 buf: Deprecate static/immutable buffers
Nick Wellnhofer 644a89e0 2022-08-31T22:11:25 [CVE-2022-40304] Fix dict corruption caused by entity reference cycles When an entity reference cycle is detected, the entity content is cleared by setting its first byte to zero. But the entity content might be allocated from a dict. In this case, the dict entry becomes corrupted leading to all kinds of logic errors, including memory errors like double-frees. Stop storing entity content, orig, ExternalID and SystemID in a dict. These values are unlikely to occur multiple times in a document, so they shouldn't have been stored in a dict in the first place. Thanks to Ned Williamson and Nathan Wachholz working with Google Project Zero for the report!
Nick Wellnhofer 2cac6269 2022-09-01T03:14:13 Don't use sizeof(xmlChar) or sizeof(char)
Nick Wellnhofer 0f568c0b 2022-08-26T01:22:33 Consolidate private header files Private functions were previously declared - in header files in the root directory - in public headers guarded with IN_LIBXML - in libxml.h - redundantly in source files that used them. Consolidate all private header files in include/private.
Nick Wellnhofer 776d15d3 2022-03-02T00:29:17 Don't check for standard C89 headers Don't check for - ctype.h - errno.h - float.h - limits.h - math.h - signal.h - stdarg.h - stdlib.h - string.h - time.h Stop including non-standard headers - malloc.h - strings.h
Nick Wellnhofer f5509772 2022-02-20T22:06:16 Fix documentation in entities.c
Nick Wellnhofer 346c3a93 2022-02-20T18:46:42 Remove elfgcchack.h The same optimization can be enabled with -fno-semantic-interposition since GCC 5. clang has always used this option by default.
Nick Wellnhofer ce0871e1 2022-02-20T16:44:41 Only warn on invalid redeclarations of predefined entities Downgrade the error message to a warning since the error was ignored, anyway. Also print the name of redeclared entity. For a proper fix that also shows filename and line number of the invalid redeclaration, we'd have to - pass the parser context to the entity functions somehow, or - make these functions return distinct error codes. Partial fix for #308.
Joel Hockey bf227135 2020-08-16T17:19:35 Validate UTF8 in xmlEncodeEntities Code is currently assuming UTF-8 without validating. Truncated UTF-8 input can cause out-of-bounds array access. Adds further checks to partial fix in 50f06b3e. Fixes #178
Nick Wellnhofer cbe1212d 2021-02-09T17:07:21 Fix null deref introduced with previous commit Found by OSS-Fuzz.
Nick Wellnhofer 01411e7c 2021-02-08T20:58:32 Check for invalid redeclarations of predefined entities Implement section "4.6 Predefined Entities" of the XML 1.0 spec and check whether redeclarations of predefined entities match the original definitions. Note that some test cases declared <!ENTITY lt "<"> But the XML spec clearly states that this is illegal: > If the entities lt or amp are declared, they MUST be declared as > internal entities whose replacement text is a character reference to > the respective character (less-than sign or ampersand) being escaped; > the double escaping is REQUIRED for these entities so that references > to them produce a well-formed result. Also fixes #217 but the connection is only tangential. The integer overflow discovered by fuzzing was more related to the fact that various parts of the parser disagreed on whether to prefer predefined entities over their redeclarations. The whole situation is a mess and even depends on legacy parser options. But now that redeclarations are validated, it shouldn't make a difference. As noted in the added comment, this is also one of the cases where overly defensive checks can hide interesting logic bugs from fuzzers.
Nick Wellnhofer 20c60886 2020-03-08T17:19:42 Fix typos Resolves #133.
Jared Yanovich 2a350ee9 2019-09-30T17:04:54 Large batch of typo fixes Closes #109.
Nick Wellnhofer e03f0a19 2017-11-09T16:42:47 Fix hash callback signatures Make sure that all parameters and return values of hash callback functions exactly match the callback function type. This is required to pass clang's Control Flow Integrity checks and to allow compilation to asm.js with Emscripten. Fixes bug 784861.
Stéphane Michaut 454e397e 2017-08-28T14:30:43 Porting libxml2 on zOS encoding of code First set of patches for zOS - entities.c parser.c tree.c xmlschemas.c xmlschemastypes.c xpath.c xpointer.c: ask conversion of code to ISO Latin 1 to avoid having the compiler assume EBCDIC codepoint for characters. - xmlmodule.c: make sure we have support for modules - xmlIO.c: zOS path names are special avoid dsome of the expectstions from Unix/Windows
David Kilzer 4472c3a5 2016-05-13T15:13:17 Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
Kurt Roeckx 95ebe53b 2014-10-13T16:06:21 Fix and add const qualifiers For https://bugzilla.gnome.org/show_bug.cgi?id=689483 It seems there are functions that do use the const qualifier for some of the arguments, but it seems that there are a lot of functions that don't use it and probably should. So I created a patch against 2.9.0 that makes as much as possible const in tree.h, and changed other files as needed. There were a lot of cases like "const xmlNodePtr node". This doesn't actually do anything, there the *pointer* is constant not the object it points to. So I changed those to "const xmlNode *node". I also removed some consts, mostly in the Copy functions, because those functions can actually modify the doc or node they copy from
Daniel Veillard 0ab8ce53 2013-03-28T08:47:42 Switched comment in file to UTF-8 encoding
Daniel Veillard 7651606f 2012-09-11T14:02:08 Various cleanups to avoid compiler warnings
Daniel Veillard f8e3db04 2012-09-11T13:26:36 Big space and tab cleanup Remove all space before tabs and space and tabs at end of lines.
Daniel Veillard 7d4c529a 2012-09-05T11:45:32 Improve HTML escaping of attribute on output Handle special cases of &{...} constructs as hinted in the spec http://www.w3.org/TR/html401/appendix/notes.html#h-B.7.1 and special values as comment <!-- ... --> used for server side includes This is limited to attribute values in HTML content.
Aron Xu baaf03f8 2012-07-20T15:41:34 Fix an error in previous commit
Daniel Veillard 4f9fdc70 2012-07-18T11:38:17 Fix entities local buffers size problems
Daniel Veillard 13cee4e3 2009-09-05T14:52:55 Fix a bunch of scan 'dead increments' and cleanup * HTMLparser.c c14n.c debugXML.c entities.c nanohttp.c parser.c testC14N.c uri.c xmlcatalog.c xmllint.c xmlregexp.c xpath.c: fix unused variables, or unneeded increments as well as a couple of space issues * runtest.c: check for NULL before calling unlink()
Daniel Veillard aa6de47e 2008-08-25T14:53:31 applied patch from Aswin to fix tree skipping fixed a comment and added a * xmlreader.c: applied patch from Aswin to fix tree skipping * include/libxml/entities.h entities.c: fixed a comment and added a new xmlNewEntity() entry point * runtest.c: be less verbose * tree.c: space and tabs cleanups daniel svn path=/trunk/; revision=3774
Daniel Veillard f4f4e485 2008-08-25T08:57:48 rework the patch to avoid some ABI issue with people allocating entities * include/libxml/entities.h entities.c SAX2.c parser.c: rework the patch to avoid some ABI issue with people allocating entities structure directly Daniel svn path=/trunk/; revision=3773
Daniel Veillard 4bf899bf 2008-08-20T17:04:30 fix for CVE-2008-3281 Daniel * include/libxml/parser.h include/libxml/entities.h entities.c parserInternals.c parser.c: fix for CVE-2008-3281 Daniel svn path=/trunk/; revision=3772
Daniel Veillard a37a6ad9 2006-10-10T20:05:45 trying to fix entities behaviour when using SAX, had to extend entities * include/libxml/entities.h entities.c SAX2.c parser.c: trying to fix entities behaviour when using SAX, had to extend entities content and hack on the entities processing code, but that should fix the long standing bug #159219 Daniel
Daniel Veillard 2728f845 2006-03-09T16:49:24 more cleanups based on coverity reports. Daniel * SAX2.c catalog.c encoding.c entities.c example/gjobread.c python/libxml.c: more cleanups based on coverity reports. Daniel
Daniel Veillard 5d4644ef 2005-04-01T13:11:58 revamped the elfgcchack.h format to cope with gcc4 change of aliasing * doc/apibuild.py doc/elfgcchack.xsl: revamped the elfgcchack.h format to cope with gcc4 change of aliasing allowed scopes, had to add extra informations to doc/libxml2-api.xml to separate the header from the c module source. * *.c: updated all c library files to add a #define bottom_xxx and reimport elfgcchack.h thereafter, and a bit of cleanups. * doc//* testapi.c: regenerated when rebuilding the API Daniel
Daniel Veillard 316a5c39 2005-01-23T22:56:39 added xmlHashCreateDict where the hash reuses the dictionnary for internal * hash.c include/libxml/hash.h: added xmlHashCreateDict where the hash reuses the dictionnary for internal strings * entities.c valid.c parser.c: reuse that new API, leads to a decent speedup when parsing for example DocBook documents. Daniel
Daniel Veillard 7da92709 2005-01-23T20:15:53 small speedup in skipping blanks characters interning the entities strings * parser.c: small speedup in skipping blanks characters * entities.c: interning the entities strings Daniel
Daniel Veillard ce682bc2 2004-11-05T17:22:25 autogenerate a minimal NULL value sequence for unknown pointer types This * gentest.py testapi.c: autogenerate a minimal NULL value sequence for unknown pointer types * HTMLparser.c SAX2.c chvalid.c encoding.c entities.c parser.c parserInternals.c relaxng.c valid.c xmlIO.c xmlreader.c xmlsave.c xmlschemas.c xmlschemastypes.c xmlstring.c xpath.c xpointer.c: This uncovered an impressive amount of entry points not checking for NULL pointers when they ought to, closing all the open gaps. Daniel
Daniel Veillard 8e725fb4 2004-11-05T14:16:50 fixed a compilation problem on a recent change Daniel * entities.c: fixed a compilation problem on a recent change Daniel
Daniel Veillard ce244ad5 2004-11-05T10:03:46 fixed the way the generator works, extended the testing, especially with * gentest.py testapi.c: fixed the way the generator works, extended the testing, especially with more real trees and nodes. * HTMLtree.c tree.c valid.c xinclude.c xmlIO.c xmlsave.c: a bunch of real problems found and fixed. * entities.c: fix error reporting to go through the new handlers Daniel
Daniel Veillard 62040be3 2004-05-17T03:17:26 avoid returning default namespace when searching from an attribute reverse * tree.c: avoid returning default namespace when searching from an attribute * entities.c xmlwriter.c: reverse xmlEncodeSpecialChars() behaviour back to escaping " since the normal serialization routines do not use it anymore, should close bug #134477 . Tried to make the writer avoid it too but it didn't work. Daniel
Daniel Veillard 18ab8721 2003-12-09T22:51:37 fixed an XML entites content serialization potentially triggered by * entities.c: fixed an XML entites content serialization potentially triggered by XInclude, see #126817 Daniel
Daniel Veillard d4532558 2003-11-25T18:29:55 fixed #127877, never output &quot; in element content this changes the * entities.c: fixed #127877, never output &quot; in element content * result/isolat3 result/slashdot16.xml result/noent/isolat3 result/noent/slashdot16.xml result/valid/REC-xml-19980210.xml result/valid/index.xml result/valid/xlink.xml: this changes the output of a few tests Daniel
William M. Brack 9e66059f 2003-10-20T14:56:06 fixed problem reported on the mailing list by Melvyn Sopacua - wrong * entities.c, valid.c: fixed problem reported on the mailing list by Melvyn Sopacua - wrong argument order on functions called through xmlHashScan.
William M. Brack 76e95df0 2003-10-18T16:20:14 Changed all (?) occurences where validation macros (IS_xxx) had * include/libxml/parserInternals.h HTMLparser.c HTMLtree.c SAX2.c catalog.c debugXML.c entities.c parser.c relaxng.c testSAX.c tree.c valid.c xmlschemas.c xmlschemastypes.c xpath.c: Changed all (?) occurences where validation macros (IS_xxx) had single-byte arguments to use IS_xxx_CH instead (e.g. IS_BLANK changed to IS_BLANK_CH). This gets rid of many warning messages on certain platforms, and also high- lights places in the library which may need to be enhanced for proper UTF8 handling.
Daniel Veillard b2517d85 2003-10-01T19:13:56 Fix error on output of high codepoint charref like &#x10FFFF; , reported * entities.c: Fix error on output of high codepoint charref like &#x10FFFF; , reported by Eric Hanchrow Daniel
Daniel Veillard d3a2e4c2 2003-09-30T13:38:04 made the predefined entities static predefined structures to avoid the * entities.c legacy.c parser.c: made the predefined entities static predefined structures to avoid the work, memory and hazards associated to initialization/cleanup. Daniel
Daniel Veillard 652327a7 2003-09-29T18:02:38 Adding a configure option to remove tree manipulation code which is not * configure.in entities.c tree.c valid.c xmllint.c include/libxml/tree.h include/libxml/xmlversion.h.in: Adding a configure option to remove tree manipulation code which is not strictly needed by the parser. Daniel
Daniel Veillard a9cce9cd 2003-09-29T13:20:24 Okay this is scary but it is just adding a configure option to disable * HTMLtree.c SAX2.c c14n.c catalog.c configure.in debugXML.c encoding.c entities.c nanoftp.c nanohttp.c parser.c relaxng.c testAutomata.c testC14N.c testHTML.c testRegexp.c testRelax.c testSchemas.c testXPath.c threads.c tree.c valid.c xmlIO.c xmlcatalog.c xmllint.c xmlmemory.c xmlreader.c xmlschemas.c example/gjobread.c include/libxml/HTMLtree.h include/libxml/c14n.h include/libxml/catalog.h include/libxml/debugXML.h include/libxml/entities.h include/libxml/nanohttp.h include/libxml/relaxng.h include/libxml/tree.h include/libxml/valid.h include/libxml/xmlIO.h include/libxml/xmlschemas.h include/libxml/xmlversion.h.in include/libxml/xpathInternals.h python/libxml.c: Okay this is scary but it is just adding a configure option to disable output, this touches most of the files. Daniel
Daniel Veillard 4432df23 2003-09-28T18:58:27 cleanup, creating a new legacy.c module, made sure make tests ran in * Makefile.am: cleanup, creating a new legacy.c module, made sure make tests ran in reduced conditions * SAX.c SAX2.c configure.in entities.c globals.c parser.c parserInternals.c tree.c valid.c xlink.c xmlIO.c xmlcatalog.c xmlmemory.c xpath.c xmlmemory.c include/libxml/xmlversion.h.in: increased the modularization, allow to configure out validation code and legacy code, added a configuration option --with-minimum compiling only the mandatory code which then shrink to 200KB. Daniel
Daniel Veillard 9ee35f36 2003-09-28T00:19:54 fix a bug raised by the Mips compiler. move the SAXv1 block definitions to * parser.c: fix a bug raised by the Mips compiler. * include/libxml/SAX.h include/libxml/parser.h: move the SAXv1 block definitions to parser.h fixes bug #123380 * xmlreader.c include/libxml/xmlreader.h: reinstanciate the attribute and element pool borken 2 commits ago. Start playing with an entry point to preserve a subtree. * entities.c: remove a warning. Daniel
William M. Brack 899e64aa 2003-09-26T18:03:42 minor change to avoid compilation warnings on some (e.g. AIX) systems * HTMLparser.c, entities.c, xmlreader.c: minor change to avoid compilation warnings on some (e.g. AIX) systems
Daniel Veillard 34ba3879 2003-07-15T13:34:05 removed some warnings by casting xmlChar to unsigned int and a couple of * DOCBparser.c HTMLparser.c entities.c parser.c relaxng.c xmlschemas.c xpath.c: removed some warnings by casting xmlChar to unsigned int and a couple of others. * xmlschemastypes.c: fixes a segfault on empty hexBinary strings Daniel
Daniel Veillard 8265a18a 2003-06-13T10:05:56 do not generate &quot; for " outside of attributes this changes the output * entities.c: do not generate &quot; for " outside of attributes * result//*: this changes the output of some tests Daniel
Daniel Veillard 19ab45b5 2003-02-26T15:49:03 fixes again one of the problem raised by James Clark in #106788 Daniel * entities.c: fixes again one of the problem raised by James Clark in #106788 Daniel
Daniel Veillard 0046c0fe 2003-02-23T13:52:30 another fix for nodeinfo in entities problem fixed bug #106788 from James * parser.c: another fix for nodeinfo in entities problem * tree.c entities.c: fixed bug #106788 from James Clark some spaces need to be serialized as character references. Daniel
Daniel Veillard 2d84a894 2002-12-30T00:01:08 Fixed a really nasty problem raised by a DocBook XSLT transform provided * entities.c parser.c tree.c include/libxml/entities.h: Fixed a really nasty problem raised by a DocBook XSLT transform provided by Sebastian Bergmann Daniel
Daniel Veillard 3487c8d9 2002-09-05T11:33:25 get rid of all the perror() calls made in the library execution paths. * DOCBparser.c HTMLparser.c c14n.c entities.c list.c parser.c parserInternals.c xmlIO.c: get rid of all the perror() calls made in the library execution paths. This should fix both #92059 and #92385 Daniel
Daniel Veillard 34ce8bec 2002-03-18T19:37:11 preparing 2.4.18 updated and rebuilt the web site implement the new * configure.in: preparing 2.4.18 * doc/*: updated and rebuilt the web site * *.c libxml.h: implement the new IN_LIBXML scheme discussed with the Windows and Cygwin maintainers. * parser.c: humm, changed the way the SAX parser work when xmlSubstituteEntitiesDefault(1) is set, it will then do the entity registration and loading by itself in case the user provided SAX getEntity() returns NULL. * testSAX.c: added --noent to test the behaviour. Daniel
Daniel Veillard 2875770e 2002-02-18T11:19:30 fixed a couple of conformances issues deep into the validation code * SAX.c entities.c: fixed a couple of conformances issues deep into the validation code (standalone and undeclared Notations) Daniel
Daniel Veillard 8ee9c8f6 2002-01-26T21:42:58 applied patch from Anthony Jones to implement copy of DTD subtree too. Had * entities.c tree.c include/libxml/entities.h: applied patch from Anthony Jones to implement copy of DTD subtree too. Had just to keep 2 function private which really ought to become public ones. Daniel
Daniel Veillard 3606581d 2002-01-24T15:02:46 another set of patches from Anthony Jones for copy operations cleanup and * valid.c tree.c entities.c: another set of patches from Anthony Jones for copy operations cleanup and robustness Daniel
Daniel Veillard 845cce4c 2002-01-09T11:51:37 Anthony Jones pointed a bug in xmlCopyEntity() Daniel * entities.c: Anthony Jones pointed a bug in xmlCopyEntity() Daniel
Daniel Veillard cbaf3995 2001-12-31T16:16:02 applied 42 documentation patches from Charlie Bozeman. Regenerated the * *.c include/libxml/*.h doc/html/*: applied 42 documentation patches from Charlie Bozeman. Regenerated the HTML docs. Daniel
Daniel Veillard 3c01b1d8 2001-10-17T15:58:35 - include/libxml/globals.h include/libxml/threads.h threads.c testThreads.c: far more testing, cleaning up bugs - *.c : make sure globals.h is always included. Daniel
Daniel Veillard b44025c7 2001-10-11T22:55:55 started integrating the non-controversial parts of Gary Pennington * HTMLtree.c catalog.c debugXML.c entities.c nanoftp.c parser.c valid.c xmlmemory.c xpath.c xpointer.c: started integrating the non-controversial parts of Gary Pennington multithread patches * catalog.c: corrected a small bug introduced Daniel
Daniel Veillard 16698281 2001-09-14T10:29:27 do not output hexadecimal charrefs when serializing HTML since some * encoding.c entities.c: do not output hexadecimal charrefs when serializing HTML since some version of Netscape can't grok it, generate decimal ones. * result/HTML/doc3.htm: output changed due to previous test * parserInternals.c: repair xmlKeepBlanksDefault() broken in 2.4.4 Daniel
Daniel Veillard 05c13a20 2001-09-09T08:38:09 John Fleck fixed typos in the options output fix ignorable white space SAX * xmllint.c: John Fleck fixed typos in the options output * parser.c SAX.c: fix ignorable white space SAX selection * entities.c: Steve Underwood found the possibility of an ininite loop in case of error. Daniel
Daniel Veillard 22090731 2001-07-16T00:06:07 cleanup of global variables, marking some const or private. Daniel * include/libxml/parserInternals.h include/libxml/HTMLparser.h xmlIO.c tree.c parserInternals.c entities.c encoding.c HTMLparser.c: cleanup of global variables, marking some const or private. Daniel
Daniel Veillard 62f313ba 2001-07-04T19:49:14 - SAX.c entities.c parser.c: changed completely the way entities are handled when running the parser in entity substitution mode. This fixes a bug reported by Stephan Kulow and nearly divides by 3 the amount of memory required by libxslt to load and process DocBook TDG. Daniel
Daniel Veillard c5d64345 2001-06-24T12:13:24 Summer's cleanup, a really big one: * AUTHORS: added William and Bjorn * include/libxml/*.h *.c README doc/*.html etc.: changed old email to daniel@veillard.com hopefully I won't have to do this again * doc/Makefile.am doc/html/*.html: cleanup makefile, checked that docs can be rebuilt cleanly now * include/libxml/xml*version.h*: removed include/libxml/xmlversion.h from CVs it's generated, added include/libxml/xmlwin32version.h also generated but which should change far less frequently. * catalog.c nanoftp.c: made sure to include libxml.h not libxml/xmlversion.h directly * include/libxml/*.h: include xmlwin32version.h instead of xmlversion.h when compiling on WIN32 and MSC Daniel
Daniel Veillard d79bcd1b 2001-06-21T22:07:42 attempt to work around what seemed a gcc optimizer bug when handling * xpath.c: attempt to work around what seemed a gcc optimizer bug when handling floats on i386 http://veillard.com/gcc.bug * tree.c entities.c encoding.c: doing some cleanups while chasing it Daniel
Daniel Veillard 122376b8 2001-04-24T12:12:30 Staring to receive bug reports on 2.3.7: - entities.c: xmlEncodeEntitiesReentrant fixed a few accesses to doc where it wasn't checked against NULL reported by Jens Laas Daniel
Bjorn Reese 70a9da54 2001-04-21T16:57:29 trio upgrade and integration
Daniel Veillard 92ad2104 2001-03-27T12:47:33 Spring cleanup ...: - configure.in Makefile.am config.h.in Spring cleanup ...: - configure.in Makefile.am config.h.in xmlversion.h.in: detect if we need string functions - trio.[ch] strio.[ch]: embedded the Trio-0.23 string functions to be able to use them where needed. Applied some changes to reduce name linking pollution and compile in only what's needed. - HTMLtree.c debugXML.c entities.c error.c nanoftp.c valid.c xlink.c xmlversion.h.in xpath.c: got rid of the #ifdef for the string manipulation functions - xmlmemory.[ch]: removed DEBUG_MEMORY_FREED and added it automatically to the free() function of xmlmemory.c - entities.c HTMLtree.c parserInternals.c tree.c uri.c valid.c xinclude.c xmlIO.c xpath.c xpointer.c: removed the MEM_CLEANUP usage. Daniel
Daniel Veillard 56a4cb8c 2001-03-24T17:00:36 Huge cleanup, I switched to compile with -Wall -g -O -ansi -pedantic -W -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline - HTMLparser.[ch] HTMLtree.c SAX.c debugXML.c encoding.[ch] encoding.h entities.c error.c list.[ch] nanoftp.c nanohttp.c parser.[ch] parserInternals.[ch] testHTML.c testSAX.c testURI.c testXPath.c tree.[ch] uri.c valid.[ch] xinclude.c xmlIO.[ch] xmllint.c xmlmemory.c xpath.c xpathInternals.h xpointer.[ch] example/gjobread.c: Cleanup, staticfied a number of non-exported functions, detected and cleaned up a dozen of problem found this way, avoided a lot of public function name/typedef/system names clashes - doc/xml.html: updated - configure.in: switched private flags to the really pedantic ones. Daniel
Daniel Veillard 48b2f896 2001-02-25T16:11:03 Okay time to improve performances, gprof session: before real 0m2.483s (2.3.2 release yesterday) current real 0m1.763s when parsing (with tree build/freeing) db10000.xml from XSLTMark: - xmlmemory.h HTMLparser.c HTMLtree.c entities.c parser.c xpath.c xpointer.c tree.c uri.c valid.c xinclude.c xmlIO.c: avoiding memcpy in production builds MEM_CLEANUP macro use - parser.[ch] parserInternals.c: optimizations of the tightest internal loops inside the parser. Better checking of I/O flushing/loading conditions - xmllint.c : added --timing Daniel
Owen Taylor 3473f88a 2001-02-23T17:55:21 Revert directory structure changes
CET 2001 Tomasz K³oczko 64636e7f 2001-02-23T01:37:32 moved to libxml directory - this allow simplify automake/autoconf. Now Thu Feb 23 02:03:56 CET 2001 Tomasz K³oczko <kloczek@pld.org.pl> * *.c *.h libxml files: moved to libxml directory - this allow simplify automake/autoconf. Now isn't neccessary hack on am/ac level for make and remove libxml symlink (modified for this also configure.in and main Makefile.am). Now automake abilities are used in best way (like in many other projects with libraries). * include/win32config.h: moved to libxml directory (now include directory isn't neccessary). * Makefile.am, examples/Makefile.am, libxml/Makefile.am: added empty DEFS and in INCLUDES rest only -I$(top_builddir) - this allow minimize parameters count passed to libtool script (now compilation is also slyghtly more quiet). * configure.in: simplifies libzdetestion - prepare separated variables for keep libz name and path to libz header files isn't realy neccessary (if someone have libz installed in non standard prefix path to header files ald library can be passed as: $ CFALGS="-I</libz.h/path>" LDFLAGS="-L</libz/path>" ./configure * autogen.sh: check now for libxml/entities.h. After above building libxml pass correctly and also pass "make install DESTDIR=</install/prefix>" from tar ball generated by "make dist". Seems ac/am reorganization is finished. This changes not touches any other things on *.{c,h} files level.
Daniel Veillard d6d7f7bf 2000-10-25T19:56:55 patched to redirrect all "out of context" error messages to a reconfigurable routine. The changes are: * xmlerror.h : added the export of an error context type (void *) an error handler type xmlGenericErrorFunc there is an interface xmlSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler); to reset the error handling routine and its argument (by default it's equivalent to respectively fprintf and stderr. * all the c files: all wild accesses to stderr or stdout within the library have been replaced to calls to the handler. Daniel
Daniel Veillard 126f2799 2000-10-24T17:10:12 Bunch of fixes, finishing moving datastructures to the hash stuff: - hash.[ch] debugXML.c: expanded/enhanced the API, added multikey tuples, made hash structure opaque - valid.[ch]: moved elements, attributes, notations decalarations as well as ID and refs to hash tables. - entities.c: hash cleanup - xmlmemory.c: fixed a dump problem in debug mode - include/Makefile.am: problem passing in DESTDIR= values patch from Marc Christensen <marc@calderasystems.com> - nanohttp.c: removed debugging remains - HTMLparser.c: the bogus tag should be ignored (Wayne) - HTMLparser.c parser.c: fixing a number of problems with the macros in the *parser.c files (Wayne). - HTMLparser.c: close the previous option when opening a new one (Marc Sanfacon). - result/HTML/*: updated the HTML results accordingly Daniel
Daniel Veillard 52afe800 2000-10-22T16:56:02 Started working on the hash table module integration, fixed a bug: - entities.[ch] xpath.[ch] hash.[ch] debugXML.c tree.h: added/hacked hash tables from Bjorn Reese <breese@mail1.stofanet.dk>. Switched XPath functions and XML entities table to them. More to come... - xmlIO.c: fixed libxml closing FILEs it didn't open. Daniel
Daniel Veillard 8b5dd83f 2000-10-01T20:28:44 - configure.in: releasing 2.2.4 - parser.[ch]: added xmlStrEqual() - HTMLparser.c HTMLtree.c SAX.c debugXML.c entities.c parser.c tree.c valid.c xlink.c xpath.c: converted all !xmlStrcmp to use xmlStrEqual instead - TODO: updated - added an XPath test Daniel
Daniel Veillard 39c7d71a 2000-09-10T16:14:55 Jumbo patch, resync of W3C/Gnome CVS trees: - uri.c tree.c SAX.c parser.c entities.c debugXML.c: finished the cleanup of the computation of URI references when seeking external entities. The URI reference string and the resulting URI are both stored now. - parser.c HTMLparser.c valid.c nanoftp.c nanohttp.c xpath.c: large s(n)printf checks and cleanup from Denis Barbier <barbier@imacs.polytechnique.fr> - xmlversion.h.in tree.h: couple of SGML declarations for a possible docbook module. - result/VC/ : a couple of test output changed due to the change of the entities URI Daniel
Daniel Veillard 4b5b80cf 2000-09-08T18:54:41 Fixed cases where doc is NULL when looking up entities, daniel
Daniel Veillard f0cc7ccc 2000-08-26T21:40:43 libxml now grok Docbook-3.1.5 and Docbook-4.1.1 DTDs, this popped out a couple of bugs and 3 speed issues, there is only on minor speed issue left. Assorted collection of user reported bugs and fixes: - doc/encoding.html: added encoding aliases doc - doc/xml.html: updates - encoding.[ch]: added EncodingAliases functions - entities.[ch] valid.[ch] debugXML.c: removed two serious bottleneck affecting large DTDs like Docbook - parser.[ch] xmllint.c: added a pedantic option, will be useful - SAX.c: redefinition of entities is reported in pedantic mode - testHTML.c: uninitialized warning from gcc - uri.c: fixed a couple of bugs - TODO: added issue raised by Michael Daniel