summaryrefslogtreecommitdiff
path: root/valid.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix list callback signaturesNick Wellnhofer2017-11-091-2/+2
| | | | | | | | | Make sure that all parameters and return values of list 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. Also change the `user` parameter type from `const void *` to `void *`.
* Fix hash callback signaturesNick Wellnhofer2017-11-091-46/+74
| | | | | | | | | 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.
* Fix -Wimplicit-fallthrough warningsJ. Peter Mugaas2017-10-211-0/+1
| | | | | Add "falls through" comments to quench implicit-fallthrough warnings which are enabled by -Wextra under GCC 7.
* Fix structured validation errorsNick Wellnhofer2017-09-071-2/+2
| | | | Also pass 'str2'. Fixes bug 777473.
* Spelling and grammar fixesNick Wellnhofer2017-06-171-3/+3
| | | | | Fixes bug 743172, bug 743489, bug 769632, bug 782400 and a few other misspellings.
* Fix type confusion in xmlValidateOneNamespaceNick Wellnhofer2017-06-071-0/+7
| | | | | | | | | Comment out code that casts xmlNsPtr to xmlAttrPtr. ID types on namespace declarations make no practical sense anyway. Fixes bug 780228. Found with libFuzzer and ASan.
* Fix NULL pointer deref in xmlDumpElementContentDaniel Veillard2017-06-071-10/+14
| | | | | | Can only be triggered in recovery mode. Fixes bug 758422 (CVE-2017-5969).
* Fix buffer size checks in xmlSnprintfElementContentNick Wellnhofer2017-06-051-9/+11
| | | | | | | | | xmlSnprintfElementContent failed to correctly check the available buffer space in two locations. Fixes bug 781333 (CVE-2017-9047) and bug 781701 (CVE-2017-9048). Thanks to Marcel Böhme and Thuan Pham for the report.
* Fix some format string warnings with possible format string vulnerabilityDavid Kilzer2016-05-231-4/+4
| | | | | | | | 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-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Fix the spurious ID already defined errorDaniel Veillard2015-09-101-2/+4
| | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=737840 the fix for 724903 introduced a regression on external entities carrying IDs, revert that patch in part and add a specific test to avoid readding it
* Couple of Missing Null checksGaurav Gupta2014-08-071-0/+4
| | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=734328 Missing Null check could cause crash, if a pointer is dereferenced. Found problem at two places in valid.c
* erroneously ignores a validation error if no error callback setDaniel Veillard2014-06-101-5/+2
| | | | | Reported by Stefan Behnel https://bugzilla.gnome.org/show_bug.cgi?id=724903
* fixing a ptotential uninitialized accessDaniel Veillard2014-02-061-1/+1
|
* Drop not needed checksDenis Pauk2013-09-301-9/+10
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=704075
* Fix pointer dereferenced before null checkGaurav2013-09-301-1/+1
| | | | | | | for https://bugzilla.gnome.org/show_bug.cgi?id=708364 xmlValidateElementContent is a private function but should still check the ctxt argument before dereferencing
* Fix spelling of "length".Michael Wood2012-10-301-1/+1
|
* Big space and tab cleanupDaniel Veillard2012-09-111-95/+95
| | | | 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-3/+5
| | | | | Specifially checking against namespace nodes before accessing node pointers
* Improve the error report on undefined REFsDaniel Veillard2011-11-111-0/+7
| | | | | | Use the tree node to provide the error context instead of the parser input which is not relevant anymore, based on a suggestion by François Delyon <f.delyon@satimage.fr>
* Recognize ID attribute in HTML without DOCTYPEDaniel Veillard2009-10-161-1/+2
| | | | | * valid.c: xmlIsID() was short-circuiting the case where there was no DTD.
* Chasing dead assignments reported by clang-scanDaniel Veillard2009-09-071-4/+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)
* 446613 small validation bug mixed content with NSDaniel Veillard2009-08-211-6/+6
| | | | | | | * valid.c: fix a bug when valdating mixed content lists and some name use namespaces prefixes. * result/valid/notes.xml* test/valid/dtds/notes.dtd * test/valid/notes.xml: add the test case to the regression suite
* Add symbol versioning to libxml2 shared libsDaniel Veillard2009-08-201-49/+0
| | | | | | | * 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
* 567619 xmlValidateNotationUse missing param testDaniel Veillard2009-08-121-1/+2
| | | | * valid.c: this was raised by a testapi crash on solaris
* * c14n.c debugXML.c doc/examples/io2.c parser.c schematron.cDaniel Veillard2009-06-041-1/+1
| | | | | valid.c xmlschemas.c xmlwriter.c xpath.c: use %s to printf string patch by Christian Persch, fixes #581612
* adds element traversal support avoid a warning regenerated danielDaniel Veillard2008-11-271-16/+26
| | | | | | | | | | * include/libxml/tree.h tree.c python/generator.py: adds element traversal support * valid.c: avoid a warning * doc/*: regenerated daniel svn path=/trunk/; revision=3804
* fix a small initialization problem raised by Ashwin increase testingDaniel Veillard2008-08-271-1/+1
| | | | | | | | | | | | | * threads.c: fix a small initialization problem raised by Ashwin * testapi.c gentest.py: increase testing especially for document with an internal subset, and entities * tree.c: fix a deallocation issue when unlinking entities from a document. * valid.c: fix a missing entry point test not found previously. * doc/*: regenerated the APIs, docs etc. daniel svn path=/trunk/; revision=3778
* more progresses against the official regression tests small cleanup forDaniel Veillard2008-07-311-82/+195
| | | | | | | | | | | | | | | | | * runxmlconf.c: more progresses against the official regression tests * runsuite.c: small cleanup for non-leak reports * include/libxml/tree.h: parsing flags and other properties are now added to the document node, this is generally useful and allow to make Name and NmToken validations based on the parser flags, more specifically the 5th edition of XML or not * HTMLparser.c tree.c: small side effects for the previous changes * parser.c SAX2.c valid.c: the bulk of teh changes are here, the parser and validation behaviour can be affected, parsing flags need to be copied, lot of changes. Also fixing various validation problems in the regression tests. Daniel svn path=/trunk/; revision=3762
* release of libxml2 2.6.28 patch from Dagfinn I. Mannsåker for idness ofDaniel Veillard2007-06-121-1/+1
| | | | | | | | | * doc/* configure.in NEWS: release of libxml2 2.6.28 * valid.c: patch from Dagfinn I. Mannsåker for idness of name in HTML, c.f. bug #305885. Daniel svn path=/trunk/; revision=3638
* applied patch to fix xmlListAppend() from Georges-André SILBER also fixDaniel Veillard2007-05-091-4/+17
| | | | | | | | | * list.c: applied patch to fix xmlListAppend() from Georges-André SILBER * valid.c: also fix the place wher it was called. Daniel svn path=/trunk/; revision=3614
* fixed a weird error where validity context whould not show up if warningsDaniel Veillard2006-10-111-1/+1
| | | | | | | | * valid.c: fixed a weird error where validity context whould not show up if warnings were disabled pointed out by Bob Stayton * xmlIO.c doc/generator.py: cleanup and fix to regenerate the docs * doc//* testapi.c: rebuilt the docs Daniel
* fixed a bug #203125 in Red hat bugzilla, crashing PHP4 on validationDaniel Veillard2006-08-221-5/+15
| | | | | | | * valid.c: fixed a bug #203125 in Red hat bugzilla, crashing PHP4 on validation errors, the heuristic to guess is a vctxt user pointer is the parsing context was insufficient. Daniel
* end of first pass on coverity reports. DanielDaniel Veillard2006-03-101-3/+5
| | | | | | | * runtest.c schematron.c testAutomata.c tree.c valid.c xinclude.c xmlcatalog.c xmlreader.c xmlregexp.c xpath.c: end of first pass on coverity reports. Daniel
* fix HTML attribute ID checking for input element. Maintain currentRob Richards2006-03-031-3/+3
| | | | | * valid.c: fix HTML attribute ID checking for input element. Maintain current attribute "name" behavior for now.
* avoid function parameters names 'list' as this seems to give troubles withDaniel Veillard2005-10-271-11/+12
| | | | | | | | * valid.c xmlregexp.c include/libxml/valid.h include/libxml/xmlregexp.h: avoid function parameters names 'list' as this seems to give troubles with VC6 and stl as reported by Samuel Diaz Garcia. Daniel
* fixing a number of issues raised by xml:id but more generally related toDaniel Veillard2005-09-031-1/+5
| | | | | | | * SAX2.c tree.c valid.c: fixing a number of issues raised by xml:id but more generally related to attributes and ID handling, fixes #314358 among other things Daniel
* added a parser XML_PARSE_COMPACT option to allocate small text nodes (lessDaniel Veillard2005-08-251-29/+19
| | | | | | | | | | | * 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
* fixed an uninitialized variable extended the API to add the parser,Daniel Veillard2005-08-221-1/+1
| | | | | | | | | | | | | * valid.c: fixed an uninitialized variable * xmlregexp.c include/libxml/xmlregexp.h: extended the API to add the parser, serializer and some debugging * include/libxml/xmlversion.h.in: made the new support compiled by default if Schemas is included * testRegexp.c: cleanup and integration of the first part of the new code with a special switch * xmllint.c: show up Expr in --version if compiled in * include/libxml/tree.h: moved the xmlBuffer definition up Daniel
* applied patch from Derek Poon fixing bug #310692 DanielDaniel Veillard2005-08-121-20/+23
| | | | | * valid.c: applied patch from Derek Poon fixing bug #310692 Daniel
* a lot of small cleanups based on Linus' sparse check output. DanielDaniel Veillard2005-07-281-4/+4
| | | | | | | | | * 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
* applied a patch from Marcus Boerger to fix problems with callingDaniel Veillard2005-07-211-1/+1
| | | | | | | | | | | | * error.c globals.c parser.c runtest.c testHTML.c testSAX.c threads.c valid.c xmllint.c xmlreader.c xmlschemas.c xmlstring.c xmlwriter.c include/libxml/parser.h include/libxml/relaxng.h include/libxml/valid.h include/libxml/xmlIO.h include/libxml/xmlerror.h include/libxml/xmlexports.h include/libxml/xmlschemas.h: applied a patch from Marcus Boerger to fix problems with calling conventions on Windows this should fix #309757 Daniel
* fixed problem with free on dupl attribute in dtd (bug309637). addedWilliam M. Brack2005-07-061-1/+6
| | | | | | | * parser.c: fixed problem with free on dupl attribute in dtd (bug309637). * test/errors/attr3.xml, result/errors/attr3.*: added regression test for this
* working some weird error reporting problem for DTD validation. augmentedDaniel Veillard2005-06-271-5/+6
| | | | | | | | * error.c valid.c: working some weird error reporting problem for DTD validation. * runtest.c: augmented with DTD validation tests * result/VC/OneID*: slight change in validation output. Daniel
* avoid name glob in agruments as it matches the glob() routine. first stepsDaniel Veillard2005-06-261-6/+6
| | | | | | | | * include/libxml/valid.h valid.c: avoid name glob in agruments as it matches the glob() routine. * runtest.c Makefile.am: first steps toward a C regression test framework. Daniel
* applied patch from Rob Richards for removal of ID (and xml:id) appliedDaniel Veillard2005-06-201-0/+1
| | | | | | | | * tree.c valid.c: applied patch from Rob Richards for removal of ID (and xml:id) * xmlreader.c: applied patch from James Wert implementing xmlTextReaderReadInnerXml and xmlTextReaderReadOuterXml Daniel
* Applied Daniel's fix for memory leak in dtd prefix (bug 300550). minorWilliam M. Brack2005-04-151-0/+4
| | | | | | * valid.c: Applied Daniel's fix for memory leak in dtd prefix (bug 300550). * xpath.c: minor change to comment only
* 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
* had to fix generation and rebuild. the testapi found a bug in the lastDaniel Veillard2005-01-261-2/+3
| | | | | | * gentest.py testapi.c: had to fix generation and rebuild. * valid.c: the testapi found a bug in the last code of course ! Daniel
* warning patches from Peter Breitenlohner serious DTD parsing speedups,Daniel Veillard2005-01-251-60/+223
| | | | | | | | * testdso.c xmlregexp.c: warning patches from Peter Breitenlohner * include/libxml/valid.h valid.c parser.c: serious DTD parsing speedups, start to deprecate 3 ElementDef related entry point and replace them with better ones. Daniel