summaryrefslogtreecommitdiff
path: root/entities.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix hash callback signaturesNick Wellnhofer2017-11-091-10/+11
| | | | | | | | | 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.
* Porting libxml2 on zOS encoding of codeStéphane Michaut2017-08-281-0/+5
| | | | | | | | | | 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
* Fix some format string warnings with possible format string vulnerabilityDavid Kilzer2016-05-231-1/+1
| | | | | | | | 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.
* Fix and add const qualifiersKurt Roeckx2014-10-131-2/+2
| | | | | | | | | | | | | | | | | | 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
* Switched comment in file to UTF-8 encodingDaniel Veillard2013-03-301-1/+1
|
* Various cleanups to avoid compiler warningsDaniel Veillard2012-09-111-1/+4
|
* Big space and tab cleanupDaniel Veillard2012-09-111-12/+12
| | | | Remove all space before tabs and space and tabs at end of lines.
* Improve HTML escaping of attribute on outputDaniel Veillard2012-09-051-8/+78
| | | | | | | 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.
* Fix an error in previous commitAron Xu2012-07-201-1/+1
|
* Fix entities local buffers size problemsDaniel Veillard2012-07-181-13/+23
|
* Fix a bunch of scan 'dead increments' and cleanupDaniel Veillard2009-09-051-2/+2
| | | | | | | | * 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()
* applied patch from Aswin to fix tree skipping fixed a comment and added aDaniel Veillard2008-08-251-33/+89
| | | | | | | | | | | * 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
* rework the patch to avoid some ABI issue with people allocating entitiesDaniel Veillard2008-08-251-5/+5
| | | | | | | | | * 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
* fix for CVE-2008-3281 DanielDaniel Veillard2008-08-201-5/+5
| | | | | | | | * 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
* trying to fix entities behaviour when using SAX, had to extend entitiesDaniel Veillard2006-10-101-5/+6
| | | | | | | | * 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
* more cleanups based on coverity reports. DanielDaniel Veillard2006-03-091-5/+2
| | | | | | * SAX2.c catalog.c encoding.c entities.c example/gjobread.c python/libxml.c: more cleanups based on coverity reports. Daniel
* revamped the elfgcchack.h format to cope with gcc4 change of aliasingDaniel Veillard2005-04-011-0/+2
| | | | | | | | | | | * 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
* added xmlHashCreateDict where the hash reuses the dictionnary for internalDaniel Veillard2005-01-231-2/+3
| | | | | | | | * 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
* small speedup in skipping blanks characters interning the entities stringsDaniel Veillard2005-01-231-22/+69
| | | | | | * parser.c: small speedup in skipping blanks characters * entities.c: interning the entities strings Daniel
* autogenerate a minimal NULL value sequence for unknown pointer types ThisDaniel Veillard2004-11-051-0/+1
| | | | | | | | | | | | * 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
* fixed a compilation problem on a recent change DanielDaniel Veillard2004-11-051-2/+0
| | | | | * entities.c: fixed a compilation problem on a recent change Daniel
* fixed the way the generator works, extended the testing, especially withDaniel Veillard2004-11-051-21/+45
| | | | | | | | | * 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
* avoid returning default namespace when searching from an attribute reverseDaniel Veillard2004-05-171-2/+0
| | | | | | | | | | * 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
* fixed an XML entites content serialization potentially triggered byDaniel Veillard2003-12-091-2/+44
| | | | | | * entities.c: fixed an XML entites content serialization potentially triggered by XInclude, see #126817 Daniel
* fixed #127877, never output &quot; in element content this changes theDaniel Veillard2003-11-251-0/+2
| | | | | | | | | * 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
* fixed problem reported on the mailing list by Melvyn Sopacua - wrongWilliam M. Brack2003-10-201-1/+13
| | | | | | * entities.c, valid.c: fixed problem reported on the mailing list by Melvyn Sopacua - wrong argument order on functions called through xmlHashScan.
* Changed all (?) occurences where validation macros (IS_xxx) hadWilliam M. Brack2003-10-181-10/+2
| | | | | | | | | | | | * 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.
* Fix error on output of high codepoint charref like &#x10FFFF; , reportedDaniel Veillard2003-10-011-2/+2
| | | | | | * entities.c: Fix error on output of high codepoint charref like &#x10FFFF; , reported by Eric Hanchrow Daniel
* made the predefined entities static predefined structures to avoid theDaniel Veillard2003-09-301-67/+59
| | | | | | | * 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
* Adding a configure option to remove tree manipulation code which is notDaniel Veillard2003-09-291-0/+2
| | | | | | | | * 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
* Okay this is scary but it is just adding a configure option to disableDaniel Veillard2003-09-291-0/+2
| | | | | | | | | | | | | | | | | | * 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
* cleanup, creating a new legacy.c module, made sure make tests ran inDaniel Veillard2003-09-281-176/+0
| | | | | | | | | | | | | * 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
* fix a bug raised by the Mips compiler. move the SAXv1 block definitions toDaniel Veillard2003-09-281-1/+1
| | | | | | | | | | | * 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
* minor change to avoid compilation warnings on some (e.g. AIX) systemsWilliam M. Brack2003-09-261-1/+3
| | | | | * HTMLparser.c, entities.c, xmlreader.c: minor change to avoid compilation warnings on some (e.g. AIX) systems
* removed some warnings by casting xmlChar to unsigned int and a couple ofDaniel Veillard2003-07-151-2/+2
| | | | | | | | * 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
* do not generate &quot; for " outside of attributes this changes the outputDaniel Veillard2003-06-131-1/+1
| | | | | | * entities.c: do not generate &quot; for " outside of attributes * result//*: this changes the output of some tests Daniel
* fixes again one of the problem raised by James Clark in #106788 DanielDaniel Veillard2003-02-261-0/+6
| | | | | | * entities.c: fixes again one of the problem raised by James Clark in #106788 Daniel
* another fix for nodeinfo in entities problem fixed bug #106788 from JamesDaniel Veillard2003-02-231-1/+1
| | | | | | | * 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
* Fixed a really nasty problem raised by a DocBook XSLT transform providedDaniel Veillard2002-12-301-2/+17
| | | | | | | * 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
* get rid of all the perror() calls made in the library execution paths.Daniel Veillard2002-09-051-7/+9
| | | | | | | | * 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
* preparing 2.4.18 updated and rebuilt the web site implement the newLIBXML_2_4_18Daniel Veillard2002-03-181-0/+1
| | | | | | | | | | | | | * 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
* fixed a couple of conformances issues deep into the validation codeDaniel Veillard2002-02-181-5/+8
| | | | | | * SAX.c entities.c: fixed a couple of conformances issues deep into the validation code (standalone and undeclared Notations) Daniel
* applied patch from Anthony Jones to implement copy of DTD subtree too. HadDaniel Veillard2002-01-261-0/+2
| | | | | | | | * 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
* another set of patches from Anthony Jones for copy operations cleanup andDaniel Veillard2002-01-241-0/+5
| | | | | | * valid.c tree.c entities.c: another set of patches from Anthony Jones for copy operations cleanup and robustness Daniel
* Anthony Jones pointed a bug in xmlCopyEntity() DanielDaniel Veillard2002-01-091-1/+1
| | | | | * entities.c: Anthony Jones pointed a bug in xmlCopyEntity() Daniel
* applied 42 documentation patches from Charlie Bozeman. Regenerated theDaniel Veillard2001-12-311-8/+8
| | | | | | * *.c include/libxml/*.h doc/html/*: applied 42 documentation patches from Charlie Bozeman. Regenerated the HTML docs. Daniel
* - include/libxml/globals.h include/libxml/threads.h threads.cDaniel Veillard2001-10-171-0/+1
| | | | | | testThreads.c: far more testing, cleaning up bugs - *.c : make sure globals.h is always included. Daniel
* started integrating the non-controversial parts of Gary PenningtonDaniel Veillard2001-10-111-1/+1
| | | | | | | | | * 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
* do not output hexadecimal charrefs when serializing HTML since someDaniel Veillard2001-09-141-1/+4
| | | | | | | | | * 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
* John Fleck fixed typos in the options output fix ignorable white space SAXDaniel Veillard2001-09-091-0/+1
| | | | | | | | * 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