1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-27 03:21:26 +03:00
Commit Graph

4366 Commits

Author SHA1 Message Date
Daniel Veillard
c836ba66e5 Fix a potential NULL dereference
For https://bugzilla.gnome.org/show_bug.cgi?id=733040

xmlDictLookup() may return NULL in case of allocation error,
though very unlikely it need to be checked.
2014-07-14 16:39:50 +08:00
Gaurav Gupta
54c4b1aa71 Add a couple of misisng check in xmlRelaxNGCleanupTree
For https://bugzilla.gnome.org/show_bug.cgi?id=733041

check cur->parent before dereferencing the pointer even if
a null parent there should not happen
Also fix a typo
2014-07-14 16:14:44 +08:00
Gaurav Gupta
7d2e8c950f Add a missing argument check
For https://bugzilla.gnome.org/show_bug.cgi?id=733042

the states argument of xmlRelaxNGAddStates() ought to be checked too
2014-07-14 16:08:28 +08:00
Gaurav Gupta
6d753994b9 Adding a check in case of allocation error
For https://bugzilla.gnome.org/show_bug.cgi?id=733043

There is missing Null condition in xmlRelaxNGValidateInterleave of
relaxng.c
Dereferencing it may cause a crash.
2014-07-14 16:01:10 +08:00
Daniel Veillard
4e73bfaee6 Fix a link to James SAX documentation old page 2014-07-12 17:46:46 +08:00
Dennis Filder
8eb55d782a xmlSaveUri() incorrectly recomposes URIs with rootless paths
For https://bugzilla.gnome.org/show_bug.cgi?id=731063

xmlSaveUri() of libxml2 (snapshot 2014-05-31 and earlier) returns
bogus values when called with URIs that have rootless paths
(e.g. "urx🅱️b" becomes "urx://b%3Ab" where "urx:b%3Ab" would be
correct)
2014-06-13 14:56:14 +08:00
Gaurav
3e0eec4319 Adding some missing NULL checks
in SAX2 DOM building code and in the HTML parser
2014-06-13 14:45:20 +08:00
Daniel Veillard
c35af8b18d Fixes for xmlInitParserCtxt
let's make sure that parser options are updated too when a corrsponding
global variable or other field of the context is set.
2014-06-11 17:00:39 +08:00
Daniel Veillard
dd8367da17 Fix regressions introduced by CVE-2014-0191 patch
A number of issues have been raised after the fix, and this patch
tries to correct all of them, though most were related to
postvalidation.
https://bugzilla.gnome.org/show_bug.cgi?id=730290
and other reports on list, off-list and on Red Hat bugzilla
2014-06-11 17:00:39 +08:00
Daniel Veillard
a16eb96807 erroneously ignores a validation error if no error callback set
Reported by Stefan Behnel
https://bugzilla.gnome.org/show_bug.cgi?id=724903
2014-06-10 16:06:14 +08:00
Jonas Eriksson
fcb1bb56ff configure: Add --with-python-install-dir
Cross-compiling the python bindings is a bit difficult today, as the
configure script will figure out the site packages dir
(PYTHON_SITE_PACKAGES) by either:

- Generating the path to the site-package target directories using
  libdir, and see if it exists. As it is not possible to point to the
  full path of the sysroot, since that will yield the wrong install
  path, and that the directory does not neccessarily exist on the host,
  this approach will not work.

- Fetch the site packages dir from the python interpreter as pointed to
  by --with-python. Since this python interpreter will point to the
  sysroot, the install dir generated will be inside the sysroot and thus
  not work.

This patch approaches the problem by adding the possibility of
explicitly stating the install dir of the python packages, leaving it up
to the cross-compilation environment to specify it. The patch does not
affect the default case (non-cross compilation).

Signed-off-by: Jonas Eriksson <jonas.eriksson@enea.com>
2014-06-10 14:44:03 +08:00
Jan Pokorný
acace88c4a Fix typos in relaxng.c
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
2014-06-10 14:41:06 +08:00
Sérgio Batista
d9ea913225 xmllint was not parsing the --c14n11 flag
Cut and paste error, using the wrong variable
2014-06-09 22:10:15 +08:00
Gaurav
7966a761b7 Avoid Possible null pointer dereference in memory debug mode
Fix a use before check on pointer
For https://bugzilla.gnome.org/show_bug.cgi?id=729849
2014-05-09 17:00:08 +08:00
Gaurav
41b0d1c4e5 Avoid Double Null Check
Cleanup
For https://bugzilla.gnome.org/show_bug.cgi?id=729851
2014-05-09 16:52:32 +08:00
Daniel Veillard
9cd1c3cfbd Do not fetch external parameter entities
Unless explicitely asked for when validating or replacing entities
with their value. Problem pointed out by Daniel Berrange <berrange@redhat.com>
2014-05-06 22:31:51 +08:00
Tristan Van Berkom
f0dd6e11aa xmlNodeSetName: Allow setting the name to a substring of the currently set name
Avoid freeing the currently set name until after having assigned the new name,
this allows one to call xmlNodeSetName (node, node->name + 1) to set the new
name of the node to a substring of the current name without introducing any
crash and without requiring an extra strdup().
2014-04-23 10:42:57 +08:00
Eric Zurcher
7d508fed99 Added macros for argument casts 2014-04-07 09:18:54 +08:00
Daniel Veillard
7e35abeb5f Fix a doc typo
Raised by Blasius Bieselbert on IRC
2014-03-28 22:58:26 +08:00
Nick Wellnhofer
07def30fa7 Restore context size and position after XPATH_OP_ARG
Fixes a bug with predicates:
https://mail.gnome.org/archives/xml/2014-March/msg00014.html
2014-03-24 13:02:06 +01:00
Daniel Veillard
6faa126fc3 Fix xmlParseInNodeContext() if node is not element
We really need to have ctxt->instate == XML_PARSER_CONTENT when
jumping in content parsing
Bug reported by Frank Gross
2014-03-21 17:05:51 +08:00
Gaurav
085b997cfd Avoid a possible NULL pointer dereference
For https://bugzilla.gnome.org/show_bug.cgi?id=708355
2014-02-18 11:47:43 +08:00
Nicolas Le Cam
41586ca667 Fix compilation with minimum and xinclude.
xinclude needs xmlAddNextSibling().
Compile out use of xmlLocationSetPtr when xptr is disabled.
Include xpath header.
2014-02-10 10:36:40 +08:00
Nicolas Le Cam
52010c639a Compile out use of xmlValidateNCName() when not available.
Fix compilation with minimum and valid.
2014-02-10 10:36:20 +08:00
Nicolas Le Cam
1af8b7b22e Fix compilation with minimum and schematron.
Add a hard dependancy on tree.
Disable write and close callbacks when output is disabled.
2014-02-10 10:33:31 +08:00
Nicolas Le Cam
77b5b46409 Legacy needs xmlSAX2StartElement() and xmlSAX2EndElement().
Fix compilation with minimum and legacy.
2014-02-10 10:32:45 +08:00
Nicolas Le Cam
3313d14f9d Don't use xmlValidateName() when not available.
Fix compilation with minimum and debug.
2014-02-10 10:26:30 +08:00
Daniel Veillard
c9ecf45d1b Fix xmlTextWriterWriteElement when a null content is given 2014-02-08 02:23:27 +08:00
Longstreth Jon
190a0b8939 Fix a portability issue on Windows
Apparently an verflow when comparing macro and unsigned long
2014-02-06 10:58:17 +01:00
Daniel Veillard
b0c7e7e57f Fix an typo 'onrest' in htmlScriptAttributes
As pointed out by "Laurent <guitarneck@free.fr>"
2014-02-06 10:50:35 +01:00
Jan Pokorný
75801652a2 Fix typos in {tree,xpath}.c (errror)
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
2014-02-06 10:47:47 +01:00
Daniel Veillard
e18bce0d06 fixing a ptotential uninitialized access 2014-02-06 10:47:20 +01:00
Daniel Veillard
15d12040ff Fix an fd leak in an error case 2014-02-06 10:38:00 +01:00
Daniel Veillard
054c716ea1 Missing initialization for the catalog module 2014-01-26 15:02:25 +01:00
Nick Wellnhofer
03c6723043 Handling of XPath function arguments in error case
The XPath engine tries to guarantee that every XPath function can pop
'nargs' non-NULL values off the stack. libxslt, for example, relies on
this assumption. But the check isn't thorough enough if there are errors
during the evaluation of arguments. This can lead to segfaults:

https://mail.gnome.org/archives/xslt/2013-December/msg00005.html

This commit makes the handling of function arguments more robust.

* Bail out early when evaluation of XPath function arguments fails.
* Make sure that there are 'nargs' arguments in the current call frame.
2013-12-20 17:45:04 +01:00
Jacob (Jouk) Jansen
4d041a2e80 Various portability patches for OpenVMS
Available from http://nchrem.tnw.tudelft.nl/openvms/software2.html
2013-12-17 15:33:50 +08:00
Patrick Monnerat
437f4f5977 Use specific macros for portability to OS/400
Some of the entry points for POSIX networking calls in OS/400
differs slightly due to not using const arguments
2013-12-12 15:23:09 +08:00
Patrick Monnerat
d1c0cc9908 Add macros needed for OS/400 portability 2013-12-12 15:14:47 +08:00
Patrick Monnerat
1c43f43ce3 Portability patch for fopen on OS/400 2013-12-12 15:12:53 +08:00
Patrick Monnerat
ca9fc43bf7 Portability fixes for OS/400 2013-12-12 15:11:40 +08:00
Patrick Monnerat
0f7a26d844 Improve va_list portability
Support for va_list declared as an array (cannot be referenced
explicitly)
2013-12-12 15:04:43 +08:00
Patrick Monnerat
147aaf21ea Portability fix
Don't assume fileno for stdin and stdout are 0 and 1
2013-12-12 15:02:40 +08:00
Patrick Monnerat
3a76bfedde Portability fix
increase internal use of a portability macro
2013-12-12 15:01:53 +08:00
Patrick Monnerat
66693cef33 Generic portability fix
Undefine common symbol before redefining them
2013-12-12 15:00:46 +08:00
Patrick Monnerat
44313c0a7e Shortening lines in headers
no change of semantic
2013-12-12 14:59:18 +08:00
Daniel Veillard
e59c244e73 Add limitations about encoding conversion 2013-12-11 00:01:38 +08:00
Daniel Veillard
4e1476c5ea adding init calls to xml and html Read parsing entry points
As pointed out by "Tassyns, Bram <BramT@enfocus.com>" on the list
some call had it other didn't, clean it up and add to all missing
ones
2013-12-09 15:23:40 +08:00
Jan Pokorný
761c9e9901 Get rid of 'REPLACEMENT CHARACTER' Unicode chars in xmlschemas.c
Middle dot pairs (as in [1]) turned to grave accents/backticks,
section signs to dollars (for compatibility with ASCII).

[1] http://www.w3.org/TR/xmlschema-1/

Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
2013-11-30 20:03:52 +08:00
Jan Pokorný
7a7cad6ed4 Fix typos in xmlschemas{,types}.c
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
2013-11-30 20:03:52 +08:00
Jan Pokorný
9a85d40cef Fix incorrect spelling entites->entities
Partially, a follow-up of 81d7a8245c.

Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
2013-11-30 20:03:52 +08:00