summaryrefslogtreecommitdiff
path: root/debugXML.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove hacky heuristic from b2dc5675e94aa6b5557ba63f7d66b0f08dd17e4dAlex Richardson2022-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Checking whether the context is close to the parent context by hardcoding 250 is not portable (I noticed tests were failing on Morello since the value is 288 there due to pointers being 128 bits). Instead we should ensure that the XML_VCTXT_USE_PCTXT flag is not set in cases where the user data is not actually a parser context (or ideally add a separate field but that would be an ABI break. From what I can see in the source, the XML_VCTXT_USE_PCTXT is only set if the userData field points to a valid context, and if this is not the case the flag should be cleared when changing userData rather than relying on the offset between the two. Looking at the history, I think d7cb33cf44aa688f24215c9cd398c1a26f0d25ff fixed most of the need for this workaround, but it looks like there are a few more locations that need updating; This commit changes two more places to set/clear/copy the XML_VCTXT_USE_PCTXT flag, so this heuristic should not be needed anymore. I've also drop two = NULL assignment in xmllint since this is not needed after a call to memset(). There was also an uninitialized vctxt.flags (and other fields) in `xmlShellValidate()`, which I've fixed by adding a memset() call.
* Consolidate private header filesNick Wellnhofer2022-08-261-0/+2
| | | | | | | | | | | 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.
* Add configuration flag for XPointer locations supportNick Wellnhofer2022-04-211-0/+12
| | | | | | | | | | | | | | | | | | | | | Add a new configuration flag that controls whether the outdated support for XPointer locations (ranges and points) is enabled. --with-xptr-locs # Autotools LIBXML2_WITH_XPTR_LOCS # CMake The latest spec for what it essentially an XPath extension seems to be this working draft from 2002: https://www.w3.org/TR/xptr-xpointer/ The xpointer() scheme is listed as "being reviewed" in the XPointer registry since at least 2006. libxml2 seems to be the only modern software that tries to implement this spec, but the code has many bugs and quality issues. The flag defaults to "off" and support for this extensions has to be requested explicitly. The relevant API functions are deprecated.
* Remove DOCBparserNick Wellnhofer2022-03-041-6/+0
| | | | | | | This code has been broken and deprecated since version 2.6.0, released in 2003. Because of a bug in commit 961b535c, DOCBparser.c was never compiled since 2012. I couldn't find a Debian package using any of its symbols, so it seems safe to remove this module.
* Don't check for standard C89 headersNick Wellnhofer2022-03-021-5/+1
| | | | | | | | | | | | | | | | | | | | 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
* Remove elfgcchack.hNick Wellnhofer2022-02-201-2/+1
| | | | | The same optimization can be enabled with -fno-semantic-interposition since GCC 5. clang has always used this option by default.
* Fix typosNick Wellnhofer2020-03-081-5/+5
| | | | Resolves #133.
* Large batch of typo fixesJared Yanovich2019-09-301-3/+3
| | | | Closes #109.
* Fix -Wcast-function-type warnings (GCC 8)Nick Wellnhofer2019-01-061-11/+5
| | | | | Use xmlGenericError instead of fprintf as error handler. It also prints to stderr by default.
* Fix hash callback signaturesNick Wellnhofer2017-11-091-5/+6
| | | | | | | | | 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.
* Spelling and grammar fixesNick Wellnhofer2017-06-171-1/+1
| | | | | Fixes bug 743172, bug 743489, bug 769632, bug 782400 and a few other misspellings.
* Fix some format string warnings with possible format string vulnerabilityDavid Kilzer2016-05-231-2/+2
| | | | | | | | 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 typos: dictio{ nn -> n }ar{y,ies}Jan Pokorný2016-04-151-5/+5
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* XMl Shell command "cd" does not handle "/" at end of pathDaniel Veillard2014-07-141-0/+5
| | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=731832 small fix
* Don't use xmlValidateName() when not available.Nicolas Le Cam2014-02-101-0/+2
| | | | Fix compilation with minimum and debug.
* Fix a wrong testDaniel Veillard2013-07-221-1/+1
| | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=704530 Arg is an array on the stack and can't be NULL
* Cleanup of a duplicate testDaniel Veillard2013-01-281-1/+0
| | | | | in an and expression, pointed by Thomas Jarosch <thomas.jarosch@intra2net.com> Daniel
* Big space and tab cleanupDaniel Veillard2012-09-111-15/+15
| | | | Remove all space before tabs and space and tabs at end of lines.
* Add "whereis" command to xmllint shellRyan2012-05-071-0/+78
| | | | | | | | | | | | | | | | When playing with xpath in the xmllint shell, it's really handy to be able to ask where the returned nodes live in the tree, in the same way "pwd" asks where the current node lives. The feature is actually quite easy to implement by combining the functionality of the existing dir/ls and pwd commands (see proposed patch). Example usage: / > whereis //last_name /clinical_study/overall_official/last_name /clinical_study/location/contact/last_name /clinical_study/location/investigator/last_name
* Improve xmllint shellRyan2012-05-071-2/+83
| | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=310222 adds namespace support to ls, du and the element named in the command shell prompt. It also fixes du to actually dump the requested path, if the user gives one, rather than always dumping the whole file.
* 616478 Fix xmllint shell write commandGwenn Kahz2010-11-041-1/+1
| | | | The current node wasn't passed down !
* Fix a bunch of scan 'dead increments' and cleanupDaniel Veillard2009-09-051-5/+0
| | | | | | | | * 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()
* Fix leak on SAX1, xmllint --sax1 option and debugDaniel Veillard2009-07-291-1/+3
| | | | | | | | * SAX2.c: don't leak in xmlCheckDefaultedAttributes for standalone checking * xmllint.c: fix xmllint --sax1 to actually use XML_PARSE_SAX1 * debugXML.c: don't raise an error if markup wasn't allocated from dictionary if document was parsed with option disabling it
* * c14n.c debugXML.c doc/examples/io2.c parser.c schematron.cDaniel Veillard2009-06-041-3/+3
| | | | | valid.c xmlschemas.c xmlwriter.c xpath.c: use %s to printf string patch by Christian Persch, fixes #581612
* fix various attribute normalisation problems reported by Ashwin thisDaniel Veillard2008-03-251-1/+2
| | | | | | | | | | | | | | * parser.c: fix various attribute normalisation problems reported by Ashwin * result/c14n/without-comments/example-4 result/c14n/with-comments/example-4: this impacted the result of two c14n tests :-\ * test/att9 test/att10 test/att11 result//att9* result//att10* result//att11*: added 3 specific regression tests coming from the XML spec revision and from Ashwin Daniel svn path=/trunk/; revision=3715
* made one of the changes suggested by Brian Krahmer allow to pass '--' onDaniel Veillard2008-02-211-0/+1
| | | | | | | | | * debugXML.c: made one of the changes suggested by Brian Krahmer * testRegexp.c: allow to pass '--' on the command line to allow regexps starting with the character '-' Daniel svn path=/trunk/; revision=3697
* patch from Oleg Paraschenko to fix xmlDebugDumpNode() when handled aDaniel Veillard2005-09-061-1/+2
| | | | | | * debugXML.c: patch from Oleg Paraschenko to fix xmlDebugDumpNode() when handled a namespace node. Daniel
* uninitialized field and fix on test. DanielDaniel Veillard2005-08-251-0/+1
| | | | | | * debugXML.c result/XPath/xptr/strrange2: uninitialized field and fix on test. Daniel
* change verbosity depending on API get back to previous outputs DanielDaniel Veillard2005-08-251-5/+14
| | | | | | | * debugXML.c: change verbosity depending on API * result/XPath/tests/* result/XPath/xptr/* result/xmlid/*: get back to previous outputs Daniel
* added a parser XML_PARSE_COMPACT option to allocate small text nodes (lessDaniel Veillard2005-08-251-4/+10
| | | | | | | | | | | * HTMLparser.c parser.c SAX2.c debugXML.c tree.c valid.c xmlreader.c xmllint.c include/libxml/HTMLparser.h include/libxml/parser.h: added a parser XML_PARSE_COMPACT option to allocate small text nodes (less than 8 bytes on 32bits, less than 16bytes on 64bits) directly within the node, various changes to cope with this. * result/XPath/tests/* result/XPath/xptr/* result/xmlid/*: this slightly change the output Daniel
* excluded content string check for XML_ELEMENT_DECL inWilliam M. Brack2005-07-061-0/+1
| | | | | | * debugXML.c: excluded content string check for XML_ELEMENT_DECL in xmlCtxtGenericNodeCheck * runtest.c: changed "open" calls to include O_BINARY for Windows
* added enhancement for #309057 in xmllint shell DanielDaniel Veillard2005-07-041-0/+38
| | | | | * debugXML.c: added enhancement for #309057 in xmllint shell Daniel
* complete, checking on other platforms is needed updated fix a bug raisedDaniel Veillard2005-06-301-0/+1
| | | | | | | | | | * runtest.c: complete, checking on other platforms is needed * README: updated * debugXML.c: fix a bug raised by bill on IRC * relaxng.c: fix a leak in weird circumstances * runsuite.c Makefile.am: standalone test tool agaisnt the regression suites, work in progress 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
* changed maintainer-clean dependency with suggestion from Crispin FlowerdayWilliam M. Brack2004-12-171-3/+5
| | | | | | | * doc/Makefile.am: changed maintainer-clean dependency with suggestion from Crispin Flowerday (bug #157634) * debugXML.c: fixed crash when ATTRIBUTE or DOCUMENT nodes were specified with debugDumpNode (bug #160621)
* integrated in "make tests" added -q option, and more conditional featuresDaniel Veillard2004-11-091-0/+2
| | | | | | | | | | | * Makefile.am gentest.py testapi.c: integrated in "make tests" added -q option, and more conditional features fixes * catalog.c debugXML.c parser.c testThreads.c xmllint.c xmlschemastypes.c xmlwriter.cinclude/libxml/catalog.h include/libxml/debugXML.h: various compilation and conditional cleanups. * doc/*: regenerated Daniel
* more coverage more fixes DanielDaniel Veillard2004-11-081-5/+20
| | | | | | * gentest.py testapi.c: more coverage * debugXML.c parser.c xmlregexp.c xpath.c: more fixes Daniel
* preparing release 2.6.15 cleanups DanielDaniel Veillard2004-10-271-3/+9
| | | | | | * ChangeLog NEWS configure.in doc/*: preparing release 2.6.15 * debugXML.c nanoftp.c xmlschemas.c xmlschemastypes.c: cleanups Daniel
* added checking for names values and dictionnaries generates a tons ofDaniel Veillard2004-10-261-2/+110
| | | | | | | | * debugXML.c include/libxml/xmlerror.h: added checking for names values and dictionnaries generates a tons of errors * SAX2.ccatalog.c parser.c relaxng.c tree.c xinclude.c xmlwriter.c include/libxml/tree.h: fixing the errors in the regression tests Daniel
* excluded a few nodes (with no content) from the string check routine.William M. Brack2004-10-151-4/+8
| | | | | * debugXML.c: excluded a few nodes (with no content) from the string check routine.
* added UTF-8 string checking, raise a problem, need debug DanielDaniel Veillard2004-10-151-2/+28
| | | | | | * debugXML.c include/libxml/xmlerror.h: added UTF-8 string checking, raise a problem, need debug Daniel
* added namespace checking danielDaniel Veillard2004-10-111-65/+98
| | | | | * debugXML.c include/libxml/xmlerror.h: added namespace checking daniel
* some framework preparation to add namespace checkings danielDaniel Veillard2004-10-091-0/+90
| | | | | * debugXML.c: some framework preparation to add namespace checkings daniel
* adding the tree debug mode fixing various problems reported by the debugDaniel Veillard2004-10-071-277/+195
| | | | | | | | | * debugXML.c include/libxml/debugXML.h include/libxml/xmlerror.h: adding the tree debug mode * parser.c relaxng.c tree.c xpath.c: fixing various problems reported by the debug mode. * SAX2.c: another tree fix from Rob Richards Daniel
* revamped the XML debugging module and prepare for a new checking modeDaniel Veillard2004-10-041-647/+951
| | | | | | | * configure.in debugXML.c include/libxml/xmlversion.h.in include/libxml/xmlwin32version.h.in: revamped the XML debugging module and prepare for a new checking mode Daniel
* added the routine xmlNanoHTTPContentLength to the external APIWilliam M. Brack2004-09-181-33/+35
| | | | | | | | | | | | * nanohttp.c, include/libxml/nanohttp.h: added the routine xmlNanoHTTPContentLength to the external API (bug151968). * parser.c: fixed unnecessary internal error message (bug152060); also changed call to strncmp over to xmlStrncmp. * encoding.c: fixed compilation warning (bug152307). * tree.c: fixed segfault in xmlCopyPropList (bug152368); fixed a couple of compilation warnings. * HTMLtree.c, debugXML.c, xmlmemory.c: fixed a few compilation warnings; no change to logic.
* added help for new set shell command added parser option to not generateDaniel Veillard2004-08-161-0/+1
| | | | | | | | | | * debugXML.c: added help for new set shell command * xinclude.c xmllint.c xmlreader.c include/libxml/parser.h: added parser option to not generate XInclude start/end nodes, added a specific option to xmllint to test it fixes #130769 * Makefile.am: regression test the new feature * doc/xmllint.1 doc/xmllint.xml: updated man page to document option. Daniel
* small typo pointed out by Mike Hommey slightly improved the --c14nDaniel Veillard2004-08-161-0/+47
| | | | | | | | | | | | | | | | | | | * xmlIO.c: small typo pointed out by Mike Hommey * doc/xmllint.xml, xmllint.html, xmllint.1: slightly improved the --c14n description, c.f. #144675 . * nanohttp.c nanoftp.c: applied a first simple patch from Mike Hommey for $no_proxy, c.f. #133470 * parserInternals.c include/libxml/parserInternals.h include/libxml/xmlerror.h: cleanup to avoid 'error' identifier in includes # * parser.c SAX2.c debugXML.c include/libxml/parser.h: first version of the inplementation of parsing within the context of a node in the tree #142359, new function xmlParseInNodeContext(), added support at the xmllint --shell level as the "set" function * test/scripts/set* result/scripts/* Makefile.am: extended the script based regression tests to instrument the new function. Daniel
* applied patch from Stefano Debenedetti to register namespaces in the debugDaniel Veillard2004-06-161-0/+69
| | | | | | * debugXML.c: applied patch from Stefano Debenedetti to register namespaces in the debug shell Daniel
* applied patch from Mark Vadoc avoiding using xmlParse* option and useDaniel Veillard2004-03-251-1/+1
| | | | | | | | | * debugXML.c testXPath.c xmllint.c xmlschemastypes.c: applied patch from Mark Vadoc avoiding using xmlParse* option and use xmlRead* instead * win32/Makefile.bcb: patch to Borland C++ builder from Eric Zurcher to avoid problems with some pathnames. Daniel