aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'libxml2/master' into cm-13.0replicant-6.0-0001stable/cm-13.0-ZNH5Ystable/cm-13.0-ZNH2KBstable/cm-13.0-ZNH2Kstable/cm-13.0-ZNH0EDan Pasanen2015-11-2190-341/+1100
|\ | | | | | | Change-Id: Ie7fc53fdf2140f593e0d275ae7b445b4f4723551
| * Release of libxml2-2.9.3Daniel Veillard2015-11-2013-94/+335
| | | | | | | | | | * configure.ac: updated * doc/*: regenerated
| * CVE-2015-8242 Buffer overead with HTML parser in push modeHugh Davenport2015-11-201-3/+3
| | | | | | | | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=756372 Error in the code pointing to the codepoint in the stack for the current char value instead of the pointer in the input that the SAX callback expects Reported and fixed by Hugh Davenport
| * CVE-2015-7500 Fix memory access error due to incorrect entities boundariesDaniel Veillard2015-11-202-8/+27
| | | | | | | | | | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=756525 handle properly the case where we popped out of the current entity while processing a start tag Reported by Kostya Serebryany @ Google This slightly modifies the output of 754946 in regression tests
| * Bug on creating new stream from entityDaniel Veillard2015-11-201-0/+2
| | | | | | | | | | sometimes the entity could have a lenght of 0, i.e. it wasn't parsed or used yet, and we ended up with an incoherent input state
| * Fix some loop issues embedding NEXTDaniel Veillard2015-11-201-2/+4
| | | | | | | | | | Next can switch the parser back to XML_PARSER_EOF state, we need to consider those in loops consuming input
| * Detect incoherency on GROWDaniel Veillard2015-11-201-1/+8
| | | | | | | | | | the current pointer to the input has to be between the base and end if not stop everything we have an internal state error.
| * Do not print error context when there is noneDaniel Veillard2015-11-201-1/+3
| | | | | | | | Which now happens more frequently du to xmlHaltParser use
| * Reuse xmlHaltParser() where it makes senseDaniel Veillard2015-11-201-20/+17
| | | | | | | | | | | | Unify the various place where either xmlStopParser was called (which resets the error as a side effect) and places where we used ctxt->instate = XML_PARSER_EOF to stop further processing
| * Add xmlHaltParser() to stop the parserDaniel Veillard2015-11-201-5/+29
| | | | | | | | | | | | The problem is doing it in a consistent and safe fashion It's more complex than just setting ctxt->instate = XML_PARSER_EOF Update the public function to reuse that new internal routine
| * CVE-2015-5312 Another entity expansion issueDavid Drysdale2015-11-201-0/+4
| | | | | | | | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=756733 It is one case where the code in place to detect entities expansions failed to exit when the situation was detected, leading to DoS Problem reported by Kostya Serebryany @ Google Patch provided by David Drysdale @ Google
| * CVE-2015-7497 Avoid an heap buffer overflow in xmlDictComputeFastQKeyDavid Drysdale2015-11-201-1/+4
| | | | | | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=756528 It was possible to hit a negative offset in the name indexing used to randomize the dictionary key generation Reported and fix provided by David Drysdale @ Google
| * xmlStopParser reset errNoDaniel Veillard2015-11-091-0/+3
| | | | | | | | I had used it in contexts where that information ought to be preserved
| * Avoid processing entities after encoding conversion failuresDaniel Veillard2015-11-092-3/+15
| | | | | | | | | | | | | | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=756527 and was also raised by Chromium team in the past When we hit a convwersion failure when switching encoding it is bestter to stop parsing there, this was treated as a fatal error but the parser was continuing to process to extract more errors, unfortunately that makes little sense as the data is obviously corrupt and can potentially lead to unexpected behaviour.
| * Avoid extra processing of MarkupDecl when EOFHugh Davenport2015-11-031-0/+8
| | | | | | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=756263 One place where ctxt->instate == XML_PARSER_EOF whic was set up by entity detection issues doesn't get noticed, and even overrided
| * Reenable xz support by defaultDaniel Veillard2015-11-033-8/+13
| | | | | | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=757466 problem was introduced by commit f3f86ff465c92c79f834d7b981f3c7274a8bb5c8 for https://bugzilla.gnome.org/show_bug.cgi?id=711026
| * CVE-2015-8035 Fix XZ compression support loopDaniel Veillard2015-11-031-0/+4
| | | | | | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=757466 DoS when parsing specially crafted XML document if XZ support is compiled in (which wasn't the case for 2.9.2 and master since Nov 2013, fixed in next commit !)
| * Fix parsing short unclosed comment uninitialized accessDaniel Veillard2015-10-301-7/+14
| | | | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=746048 The HTML parser was too optimistic when processing comments and didn't check for the end of the stream on the first 2 characters
| * Fix an error in previous Conditional section patchDaniel Veillard2015-10-271-1/+1
| | | | | | | | | | | | an off by one mistake in the change, led to error on correct document where the end of the included entity was exactly the end of the conditional section, leading to regtest failure
| * Correct spelling of "calling"Alex Henrie2015-10-261-1/+1
| |
| * Fix a small error in xmllint --format descriptionFabien Degomme2015-10-231-1/+1
| | | | | | | | Obviously it operates on the output not the input
| * Another variation of overflow in Conditional sectionsDaniel Veillard2015-10-231-1/+3
| | | | | | | | | | | | | | | | Which happen after the previous fix to https://bugzilla.gnome.org/show_bug.cgi?id=756456 But stopping the parser and exiting we didn't pop the intermediary entities and doing the SKIP there applies on an input which may be too small
| * Add missing Null check in xmlParseExternalEntityPrivateGaurav Gupta2015-09-301-4/+6
| | | | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=755857 a case where we check for NULL but not everywhere
| * Fix a bug in CData error handling in the push parserDaniel Veillard2015-09-186-5/+18
| | | | | | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=754947 The checking function was returning incorrect args in some cases Adds the test to teh reg suite and fix one of the existing test output
| * Fix a bug on name parsing at the end of current input bufferDaniel Veillard2015-09-155-9/+41
| | | | | | | | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=754946 When hitting the end of the current input buffer while parsing a name we could end up loosing the beginning of the name, which led to various issues.
| * Fix the spurious ID already defined errorDaniel Veillard2015-09-106-2/+25
| | | | | | | | | | | | 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
| * Fix previous change to node sort orderNick Wellnhofer2015-07-111-4/+4
| | | | | | | | | | Commit ba58f23 broke comparison of nodes from different documents. Thanks to Olli Pottonen for the report.
| * Avoid XSS on the search of xmlsoft.orgDaniel Veillard2015-07-031-2/+3
| | | | | | | | query string need to be escaped before being displayed back
| * Recover unescaped less-than character in HTML recovery parsingDaniel Veillard2015-06-301-3/+30
| | | | | | | | | | | | | | | | | | | | | | | | As pointed by Christian Schoenebeck <schoenebeck@crudebyte.com> on the list and based on some of his early patches, this preserve content when unescaped opening angle brackets are not escaped in textual content like: <p> a < b </p> <p> a <0 </p> <p> a <=0 </p> while still reporting the error.
| * Fix a self assignment issue raised by clangScott Graham2015-06-301-3/+3
| | | | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=751679 Also added a few newline cleanups
| * Fail parsing early on if encoding conversion failedDaniel Veillard2015-06-291-1/+5
| | | | | | | | | | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=751631 If we fail conversing the current input stream while processing the encoding declaration of the XMLDecl then it's safer to just abort there and not try to report further errors.
| * Do not process encoding values if the declaration if brokenDaniel Veillard2015-06-291-0/+4
| | | | | | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=751603 If the string is not properly terminated do not try to convert to the given encoding.
| * Silence clang's -Wunknown-attributeMichael Catanzaro2015-04-261-1/+1
| | | | | | | | | | | | | | Clang doesn't have perfect feature compatibility with GCC, unfortunately. https://bugzilla.gnome.org/show_bug.cgi?id=747870
| * os400: fix various ILE/RPG types definitions. Adjust build scripts.Patrick Monnerat2015-04-1623-101/+165
| | | | | | | | | | | | | | | | | | | | - A typo caused an undefined symbol reference. - A structure field name did not match the corresponding C name due to a typo. - Some structured fields were not properly aligned. - The long/ulong types were wrongly mapped to 64-bit types. - A typo in a /include directive caused a compilation error. - Doc files copy now converts from UTF-8 and split long lines. - Adjust /include file name mapping translation for proper prefix handling.
| * CVE-2015-1819 Enforce the reader to run in constant memoryDaniel Veillard2015-04-143-3/+63
| | | | | | | | | | | | | | One of the operation on the reader could resolve entities leading to the classic expansion issue. Make sure the buffer used for xmlreader operation is bounded. Introduce a new allocation type for the buffers for this effect.
| * xmlMemUsed is not thread-safeMartin von Gagern2015-04-131-2/+12
| | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=747437 just use the mutex to protect access to those variables
| * Allow HTML serializer to output HTML5 DOCTYPEShaun McCance2015-04-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=747301 Use simple HTML5 DOCTYPE for about:legacy-compat HTML5 uses a DOCTYPE without a PUBLIC or SYSTEM identifier. It looks like this: <!DOCTYPE html> I can't use XSLT to output this, because to get a DOCTYPE I have to provide a PUBLIC or SYSTEM identifier. Luckily, the standards folks recognized this and provided this semantically equivalent form for the HTML DOCTYPE: <!DOCTYPE html SYSTEM "about:legacy-compat"> But people don't like seeing the "legacy" identifier in their output. They'd rather see the shiny new DOCTYPE. Since we know that about:legacy-compat is defined by the W3C to be semantically equivalent to the sans-SYSTEM DOCTYPE, we could just special-case it in the HTML serializer in libxml2. So if you set the SYSTEM identifier to "about:legacy-compat", you get an HTML5 short-form DOCTYPE.
| * Fix support for except in nameclassesDaniel Veillard2015-03-1613-1/+28
| | | | | | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=565219 The code was imply missing even if simple, added a few regression tests.
| * Regression test for bug #695699Nick Wellnhofer2015-03-082-0/+11
| |
| * Add a couple of XPath testsNick Wellnhofer2015-03-082-0/+51
| |
| * Fix order of root nodesNick Wellnhofer2015-03-081-2/+2
| | | | | | | | Make sure root nodes are sorted before other nodes.
| * Allow attributes on descendant-or-self axisNick Wellnhofer2015-03-083-7/+16
| | | | | | | | | | | | | | | | | | If the context node is an attribute, the attribute itself is on the descendant-or-self axis. The principal node type of this axis is element, so the only node test that can return the attribute is "node()". In other words, "@attr/descendant-or-self::node()" is equivalent to "@attr". This matches the behavior of Saxon-CE.
| * Fix the fix to Windows lockingSteve Nairn2015-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=737851 Unfortunately this change has introduced a problem which results in occasional hangs on Windows when running multi-threaded on a multi-core host. When locking the xmlRMutex the count field is increment inside the critical section but when unlocking the count field is decremented outside the critical section. The increment/decrement is not atomic so this can result in the count field being updated incorrectly. The solution is to change xmlRMutexUnlock to decrement the count field before leaving the critical section rather than after.
| * Fix timsort invariant loop re: Envisage articleChristopher Swenson2015-02-271-35/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | See http://envisage-project.eu/proving-android-java-and-python-sorting-algorithm-is-broken-and-how-to-fix-it/ We use a "runLen" array of size 128, so it should be nearly impossible to have our implementation overflow. But in any case, the fix is relatively simple -- checking two extra conditions in the invariant calculation. I also took this opportunity to remove some redundancy in the left/right merge logic in the invariant loop.
| * Cleanup conditional section error handlingDaniel Veillard2015-02-231-0/+6
| | | | | | | | | | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=744980 The error handling of Conditional Section also need to be straightened as the structure of the document can't be guessed on a failure there and it's better to stop parsing as further errors are likely to be irrelevant.
| * Stop parsing on entities boundaries errorsDaniel Veillard2015-02-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | For https://bugzilla.gnome.org/show_bug.cgi?id=744980 There are times, like on unterminated entities that it's preferable to stop parsing, even if that means less error reporting. Entities are feeding the parser on further processing, and if they are ill defined then it's possible to get the parser to bug. Also do the same on Conditional Sections if the input is broken, as the structure of the document can't be guessed.
| * Add Python 3 rpm subpackageTomas Radej2015-02-181-6/+54
| | | | | | | | | | Allow compilation and packaging of both python2 and python3 when present
| * libxml2-config.cmake.in: update include directoriesSamuel Martin2015-02-131-1/+1
| | | | | | | | | | | | Align the include directories on those from the pkg-config module. Signed-off-by: Samuel Martin <s.martin49@gmail.com>
| * Don't add IDs in xmlSetTreeDocNick Wellnhofer2014-12-231-0/+8
| | | | | | | | This partially reverts my previous commit fixing bug #741919.
| * threads: use forward declarations only for glibcMichael Heimpold2014-12-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug #704908 The declarations of pthread functions, used to generate weak references to them, fail to suppress macros. Thus, if any pthread function has been provided as a macro, compiling threads.c will fail. This breaks on musl libc, which defines pthread_equal as a macro (in addition to providing the function, as required). Prevent the declarations for e.g. musl libc by refining the condition. The idea for this solution was borrowed from the alpine linux guys, see http://git.alpinelinux.org/cgit/aports/tree/main/libxml2/libxml2-pthread.patch Signed-off-by: Michael Heimpold <mhei@heimpold.de>