aboutsummaryrefslogtreecommitdiffstats
path: root/xpointer.c
Commit message (Collapse)AuthorAgeFilesLines
* RESTRICT AUTOMERGE: Update libxml2 to 2.9.8HEADreplicant-6.0-0004-transitionreplicant-6.0-0004-rc6replicant-6.0-0004-rc5-transitionreplicant-6.0-0004-rc5replicant-6.0-0004-rc4replicant-6.0-0004-rc3replicant-6.0-0004-rc2replicant-6.0-0004cm-14.1cm-13.0akirilov2018-09-061-12/+26
| | | | | | | | | | | | | | Merge to pi-dev and restore Android.mk Bug: 79662501 Bug: 36809766 Bug: 36810305 Bug: 62151041 Test: manually verify functionality for regression Change-Id: Ife351c91c932eb92992656f8ea5c08724a220306 (cherry picked from commit 4e91cfdbb1a8624e5cd5a850d6e17da11d1e34a8)
* DO NOT MERGE: Fix XPointer paths beginning with range-toBrian C. Young2017-04-171-70/+6
| | | | | | | | | | | | | | | | | The old code would invoke the broken xmlXPtrRangeToFunction. range-to isn't really a function but a special kind of location step. Remove this function and always handle range-to in the XPath code. The old xmlXPtrRangeToFunction could also be abused to trigger a use-after-free error with the potential for remote code execution. Found with afl-fuzz. Fixes CVE-2016-5131. Bug: 36554209 Change-Id: I2bd369290a884c432d16796884d48db6285f8502 (cherry picked from commit e875e1cd1fc92fd2daa57826024125cbd0b195c7)
* DO NOT MERGE: Disallow namespace nodes in XPointer rangesBrian C. Young2017-04-171-93/+56
| | | | | | | | | | | | | | Namespace nodes must be copied to avoid use-after-free errors. But they don't necessarily have a physical representation in a document, so simply disallow them in XPointer ranges. Found with afl-fuzz. Fixes CVE-2016-4658. Bug: 36554207 Change-Id: Ie570c4a53ae8ca82ed4ca19701ab7d8ba9b0468f (cherry picked from commit cde4b40a9c17aec816c6b2577250fff9354a6f3c)
* Merge remote-tracking branch 'goog/upstream-master' into mymergeXin Li2016-08-151-1/+1
| | | | | | BUG: 29834751 Change-Id: I88fc1d4f86bcbd0ac0fe9acdbe764f3d738c5f32 (cherry picked from commit e3d78e1fe0669e9c7083a4de19f1e06171849b28)
* xpointer : fixing Null PointersGaurav Gupta2014-10-071-0/+28
| | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=738053 At many places in xpointer.c Null check is missing which is dereferenced at later places.
* Remove Unnecessary Null check in xpointer.cGaurav Gupta2014-10-071-2/+0
| | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=738052 superfluous check
* Big space and tab cleanupDaniel Veillard2012-09-111-34/+34
| | | | Remove all space before tabs and space and tabs at end of lines.
* Adding various checks on node type though the APIDaniel Veillard2012-08-091-15/+15
| | | | | Specifially checking against namespace nodes before accessing node pointers
* Fix an off by one pointer accessJüri Aedla2012-05-071-11/+4
| | | | getting out of the range of memory allocated for xpointer decoding
* Hardening of XPath evaluationDaniel Veillard2011-08-191-0/+1
| | | | | | Add a mechanism of frame for XPath evaluation when entering a function or a scoped evaluation, also fix a potential problem in predicate evaluation.
* Chasing dead assignments reported by clang-scanDaniel Veillard2009-09-071-2/+1
| | | | | | | | * SAX2.c dict.c error.c hash.c nanohttp.c parser.c python/libxml.c relaxng.c runtest.c tree.c valid.c xinclude.c xmlregexp.c xmlsave.c xmlschemas.c xpath.c xpointer.c: mostly removing unneded affectations, but this led to a few real bugs and some part not yet understood (relaxng/interleave)
* Add symbol versioning to libxml2 shared libsDaniel Veillard2009-08-201-7/+14
| | | | | | | * libxml2.syms: the symbols with history, going back to 2.4.30 * Makefile.am configure.in: linking flags detection and use * parser.c tree.c valid.c xpointer.c: various cleanup of functions which could be made static or simply discarded, not that many
* Skip silently unrecognized XPointer schemesJakub Wilk2009-07-291-1/+3
| | | | | * xpointer.c: unrecognized XPointers should be skipped instead of aborting the full XPointer evaluation
* fix a few warning raised by gcc-4.1 and latests changes DanielDaniel Veillard2006-03-101-2/+2
| | | | | | * c14n.c encoding.c xmlschemas.c xpath.c xpointer.c: fix a few warning raised by gcc-4.1 and latests changes Daniel
* a lot of small cleanups based on Linus' sparse check output. DanielDaniel Veillard2005-07-281-1/+1
| | | | | | | | | * HTMLparser.c SAX2.c encoding.c globals.c parser.c relaxng.c runsuite.c runtest.c schematron.c testHTML.c testReader.c testRegexp.c testSAX.c testThreads.c valid.c xinclude.c xmlIO.c xmllint.c xmlmodule.c xmlschemas.c xpath.c xpointer.c: a lot of small cleanups based on Linus' sparse check output. Daniel
* revamped the elfgcchack.h format to cope with gcc4 change of aliasingDaniel Veillard2005-04-011-1/+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
* autogenerate a minimal NULL value sequence for unknown pointer types ThisDaniel Veillard2004-11-051-1/+4
| | | | | | | | | | | | * 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
* extending the tests coverage more fixes and cleanups DanielDaniel Veillard2004-11-041-1/+1
| | | | | | * gentest.py testapi.c: extending the tests coverage * HTMLtree.c tree.c xmlsave.c xpointer.c: more fixes and cleanups Daniel
* enhanced to assure that if xpointer is called for a document, theWilliam M. Brack2004-03-081-5/+8
| | | | | | | | | * xinclude.c: enhanced to assure that if xpointer is called for a document, the XML_PARSE_NOENT flag is set before parsing the included document so that entities will automatically get taken care of. * xpointer.c: corrected code so that, if an XML_ENTITY_REF node is encountered, it will log it and not crash (bug 135713)
* fixed problem with union when last() is used in predicate (bug #131971)William M. Brack2004-01-221-0/+1
| | | | | | * xpath.c: fixed problem with union when last() is used in predicate (bug #131971) * xpointer.c: minor change to comment for doc generation
* fixed problem pointed out by Stéphane Bidoul on the list. completedWilliam M. Brack2003-12-311-7/+12
| | | | | | | | * python/generator.py, python/libxml2class.txt: fixed problem pointed out by Stéphane Bidoul on the list. * xinclude.c, xpointer.c, xpath.c, include/libxml/xpointer.h: completed modifications required to fix Bug 129967 (at last!). Now wait to see how long before further trouble...
* Fixed memory leak reported by Dave Beckett Removed spurious commentWilliam M. Brack2003-12-301-1/+15
| | | | | | | | | | * parser.c, xmlmemory.c, include/libxml/xmlmemory.h: Fixed memory leak reported by Dave Beckett * xmlschemas.c: Removed spurious comment reported on the mailing list * xinclude.c, xpath.c, xpointer.c, libxml/include/xpointer.h: Further work on Bug 129967 concerning xpointer range handling and range-to function; much better, but still not complete
* edited a couple of comments in accordance with posting on the mailing listWilliam M. Brack2003-12-291-1/+5
| | | | | | | | | | | * xmlschemas.c: edited a couple of comments in accordance with posting on the mailing list (no logic change) * xpointer.c: working on Bug 129967, added check for NULL nodeset to prevent crash. Further work required. * xpath.c: working on Bug 129967, added code to handle XPATH_LOCATIONSET in RANGETO code, also added code to handle it in xmlXPathEvaluatePredicateResult. Further work required.
* minor error cleanup for gcc-3.3.[12] compilation warnings.William M. Brack2003-11-141-1/+1
| | | | | | * catalog.c,relaxng.c,testAutomata.c,xpointer.c,genChRanges.py, chvalid.c,include/libxml/chvalid.h,doc/examples/test1.c: minor error cleanup for gcc-3.3.[12] compilation warnings.
* Setting up the framework for structured error reporting, touches a lot ofDaniel Veillard2003-10-101-3/+3
| | | | | | | | | | | * HTMLparser.c c14n.c catalog.c error.c globals.c parser.c parserInternals.c relaxng.c valid.c xinclude.c xmlIO.c xmlregexp.c xmlschemas.c xpath.c xpointer.c include/libxml/globals.h include/libxml/parser.h include/libxml/valid.h include/libxml/xmlerror.h: Setting up the framework for structured error reporting, touches a lot of modules, but little code now the error handling trail has been cleaned up. Daniel
* cleanup migrated XPointer module to the new error mechanism DanielDaniel Veillard2003-10-101-44/+89
| | | | | | | * xpath.c: cleanup * xpointer.c include/libxml/xmlerror.h: migrated XPointer module to the new error mechanism Daniel
* added xmlMallocAtomic() to be used when allocating blocks which do notDaniel Veillard2003-04-191-1/+1
| | | | | | | | | | | | * DOCBparser.c HTMLparser.c c14n.c catalog.c encoding.c globals.c nanohttp.c parser.c parserInternals.c relaxng.c tree.c uri.c xmlmemory.c xmlreader.c xmlregexp.c xpath.c xpointer.c include/libxml/globals.h include/libxml/xmlmemory.h: added xmlMallocAtomic() to be used when allocating blocks which do not contains pointers, add xmlGcMemSetup() and xmlGcMemGet() to allow registering the full set of functions needed by a garbage collecting allocator like libgc, ref #109944 Daniel
* improved the script accordingly to the XInclude regression tests updatesDaniel Veillard2003-02-131-1/+26
| | | | | | | | | | | * check-xinclude-test-suite.py: improved the script accordingly to the XInclude regression tests updates * xpointer.c: Implemented XPointer element() Scheme W3C PR of 13 November 2002 * result/XPath/xptr/chapterschildseq result/XPath/xptr/vidchildseq test/XPath/xptr/chapterschildseq test/XPath/xptr/vidchildseq: augmented the Xpointer testsuite for the element() scheme Daniel
* tried to fix bug #97852 reported by Nicolas Noffke DanielDaniel Veillard2002-11-061-0/+2
| | | | | * xpointer.c: tried to fix bug #97852 reported by Nicolas Noffke Daniel
* preparing 2.4.18 updated and rebuilt the web site implement the newDaniel 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
* Fixing #74186, made sure all boolean expressions get fully parenthesized,Daniel Veillard2002-03-111-45/+0
| | | | | | | | | | * c14n.c: Fixing #74186, made sure all boolean expressions get fully parenthesized, ran indent on the output * configure.in HTMLtree.c SAX.c c14n.c debugXML.c tree.c xpointer.c include/libxml/tree.h: also #74186 related, removed the --with-buffers option, and all the preprocessor conditional sections that were resulting from it. Daniel
* Tentatively fixed #69655 , make compiling with -Wredundant-decls clean.Daniel Veillard2002-02-101-1/+0
| | | | | | | | | | | | * HTMLtree.c Makefile.am build_glob.py configure.in debugXML.c globals.c parser.c threads.c tree.c valid.c xmlmemory.c xpath.c xpointer.c include/libxml/globals.h include/libxml/parser.h include/libxml/parserInternals.h include/libxml/tree.h include/libxml/xmlmemory.h include/libxml/xpathInternals.h: Tentatively fixed #69655 , make compiling with -Wredundant-decls clean. * python/libxml.c: fixed a warning. Daniel
* applied 42 documentation patches from Charlie Bozeman. Regenerated theDaniel Veillard2001-12-311-17/+17
| | | | | | * *.c include/libxml/*.h doc/html/*: applied 42 documentation patches from Charlie Bozeman. Regenerated the HTML docs. Daniel
* Fixed the previous fix, DanielDaniel Veillard2001-11-281-2/+1
|
* fixed a compilation bug pointed by Danny Jamshy DanielDaniel Veillard2001-11-281-1/+1
| | | | | * xpointer.c: fixed a compilation bug pointed by Danny Jamshy 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-4/+4
| | | | | | | | | * 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
* preparing 2.4.6 release updated and rebuilt the docs fixed a number ofDaniel Veillard2001-10-101-1/+1
| | | | | | | * configure.in: preparing 2.4.6 release * doc/xml.html doc/html/*: updated and rebuilt the docs * include/libxml/*.h *.c: fixed a number of teh/the widht/width typos Daniel
* removed unused var DanielDaniel Veillard2001-08-161-2/+0
| | | | | * xpointer.c: removed unused var Daniel
* store the line numbder in element->content, may break some software, needDaniel Veillard2001-07-121-5/+9
| | | | | | | * DOCBparser.c HTMLparser.c HTMLtree.c SAX.c debugXML.c parser.c tree.c xpointer.c: store the line numbder in element->content, may break some software, need a configuration mechanism Daniel
* - xpointer.c include/win32config.h win32/libxml2/libxml2.def.srcDaniel Veillard2001-06-281-2/+2
| | | | | | libxml.h : Yon Derek provided a set of changes to compile from CVS on Windows/MSC Daniel
* Summer's cleanup, a really big one:Daniel Veillard2001-06-241-1/+1
| | | | | | | | | | | | | | | | * 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
* - Makefile.am: cleanup when --without-debug is specifiedDaniel Veillard2001-06-211-3/+5
| | | | | | | | | | - xinclude.c xpath.c xpathInternals.h xpointer.c: cleanup w.r.t. --without-debug and other include points - catalog.h testCatalog.c: a bit of cleanup and prepare for XML Catalogs - configure.in entities.h tree.h HTMLparser.c: removed --without-corba, made the _private field mandatory Daniel
* - tree.c xinclude.c xpointer.c: bug #56402 exposed a number ofDaniel Veillard2001-06-191-0/+30
| | | | | | weakness in the node copy the XPointer and the XInclude implementations. Serious cleanup. Daniel
* - HTMLparser.c: Closed bug #54891Daniel Veillard2001-05-191-1/+1
| | | | | | | | | | - result/HTML/cf_128.html* test/HTML/cf_128.html: added the test to the suite forgot to commit this one yesterday - encoding.h hash.c nanoftp.h parser.h tree.h uri.h xlink.h xpointer.c: applied a documentation patch from LotR and filled in a few missing descriptions Daniel
* trio upgrade and integrationBjorn Reese2001-04-211-6/+1
|
* Spring cleanup ...: - configure.in Makefile.am config.h.inDaniel Veillard2001-03-271-3/+0
| | | | | | | | | | | | | | | | | | | 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
* - HTMLparser.c HTMLtree.c SAX.c debugXML.c error.c parserInternals.cDaniel Veillard2001-03-261-12/+0
| | | | | | | | | testHTML.c testSAX.c tree.c valid.c xmlIO.c xmlmemory.c xmlversion.h.in xpointer.c: of course the way I defined UNUSED breaks on old gcc version. Try to be smart and also define it directly in xmlversion.h - configure.in: removed -ansi flag from the pedantic set Daniel
* Huge cleanup, I switched to compile withDaniel Veillard2001-03-241-77/+101
| | | | | | | | | | | | | | | | | | | | -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
* More cleanups, XSLT induced, start looking okay:Daniel Veillard2001-03-191-0/+1
| | | | | | | | | | | | - xpath.[ch]: still a lot of cleanup based on XSLT, added xmlXPathConvert{String,Number,Boolean} to be able to make type casts without a context stack, fixed some implementation problems related to the absence of context at parse-time, added xmlXPathEvalPredicate() and xmlXPathFreeCompExpr() in the public API too - xpointer.c xpathInternals.h: we need to know at parse time whether we are compiling an XPointer Daniel