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
Gaurav
98a4e7128b Fix a couple of missing NULL checks
For https://bugzilla.gnome.org/show_bug.cgi?id=708681
2013-11-29 23:28:21 +08:00
Gaurav
080a22c5ea Avoid a possibility of dangling encoding handler
For https://bugzilla.gnome.org/show_bug.cgi?id=711149

In Function:
int xmlCharEncCloseFunc(xmlCharEncodingHandler *handler)

If the freed handler is any one of handlers[i] list, then it will make that
hanldlers[i] as dangling. This may lead to crash issues at places where
handlers is read.
2013-11-29 23:10:50 +08:00
Arnold Hendriks
826bc32020 Fix HTML push parser to accept HTML_PARSE_NODEFDTD
For https://bugzilla.gnome.org/show_bug.cgi?id=719515

fixes htmlParseTryOrFinish to interpret HTML_PARSE_NODEFDTD,
and updates xmllint to actually pass --nodefdtd to the push
version of the HTML parser
2013-11-29 14:12:12 +08:00
Mike Alexander
a1313a6f8c Fix a bug loading some compressed files
For https://bugzilla.gnome.org/show_bug.cgi?id=712528
Related to https://bugzilla.redhat.com/show_bug.cgi?id=877567

There is a bug in xzlib.c which causes certain compressed XML files to fail to
load correctly.  The code in xz_decomp which attempts to verify the checksum
and length of the expanded data fails if the checksum or length at the end of
the file crosses a 1024 byte boundary.  It calls gz_next4 to get those two
values.  This function uses the stream state in state->zstrm, but calls
xz_avail which uses the state->strm stream info.  This causes gz_next4 to
signal a premature EOF if the data it is fetching crosses a 1024 byte boundary.
2013-11-28 23:21:23 +08:00
Gaurav
fcd4583189 Fix XPath node comparison bug
For https://bugzilla.gnome.org/show_bug.cgi?id=715143
2013-11-28 23:01:44 +08:00
Gaurav
f3d79416d7 Type mismatch in xmlschemas.c
For https://bugzilla.gnome.org/show_bug.cgi?id=715152
2013-11-28 22:53:54 +08:00
Gaurav
e79226ccdb Type mismatch in xmlschemastypes.c
For https://bugzilla.gnome.org/show_bug.cgi?id=715152
2013-11-28 22:50:57 +08:00
Shaun McCance
6473a41a49 Implement choice for name classes on attributes
https://bugzilla.gnome.org/show_bug.cgi?id=710744
2013-11-28 16:09:00 +08:00
Philip Withnall
f3f86ff465 build: Use pkg-config to find liblzma in preference to AC_CHECK_LIB
This means that liblzma’s Libs.private will be included in LZMA_LIBS if
linking the libraries statically, ensuring that there are no undefined
symbol errors from liblzma’s private libraries.

If pkg-config isn’t installed, or if liblzma.pc couldn’t be found, fall
back to using AC_CHECK_LIB as before. This will cause static linking to
fail, but that’s not a regression.

This does not introduce a compile time dependency on pkg-config.

https://bugzilla.gnome.org/show_bug.cgi?id=711026
2013-11-28 16:01:13 +08:00
Philip Withnall
f859d9a783 build: Add @LZMA_LIBS@ to libxml’s pkg-config files
If libxml2 is built and linked against liblzma, the latter needs to appear in
libxml2’s Libs.private pkg-config field, otherwise static linking against
libxml2 will fail due to unresolved liblzma symbols.

https://bugzilla.gnome.org/show_bug.cgi?id=711026
2013-10-29 17:35:36 +08:00
Daniel Veillard
4b61cf61e7 fix some tabs mixing incompatible with python3
Patrick Welche <prlw1@cam.ac.uk> raised this issue
2013-10-02 22:18:21 +08:00
Gaurav
7d4e259fbf Avoid some dead code and cleanup in relaxng.c
https://bugzilla.gnome.org/show_bug.cgi?id=705388

Code needed a bit of cleanup
2013-09-30 11:27:41 +08:00
Daniel Veillard
b8bdc258de Avoid a deadcode in catalog.c
For https://bugzilla.gnome.org/show_bug.cgi?id=703504
2013-09-30 11:12:04 +08:00
Denis Pauk
0146179120 Drop not needed checks
https://bugzilla.gnome.org/show_bug.cgi?id=704075
2013-09-30 10:57:35 +08:00
Denis Pauk
283c83e0d3 run close socket on Solaris, same as we do on other platforms
https://bugzilla.gnome.org/show_bug.cgi?id=705188
2013-09-30 10:51:42 +08:00
Gaurav
c570b37972 Fix pointer dereferenced before null check
for https://bugzilla.gnome.org/show_bug.cgi?id=708364

xmlValidateElementContent is a private function but should still
check the ctxt argument before dereferencing
2013-09-30 10:43:47 +08:00
Daniel Veillard
75d13092f2 Fix a potential NULL dereference in tree code
https://bugzilla.gnome.org/show_bug.cgi?id=707750

Also reported by Gaurav, simple fix to check the pointer before
dereference
2013-09-11 15:11:27 +08:00
Gaurav
2671b013d8 Fix potential NULL pointer dereferences in regexp code
https://bugzilla.gnome.org/show_bug.cgi?id=707749

Fix 3 cases where we might dereference NULL
2013-09-11 14:59:06 +08:00
Tim Galeckas
2205ff4b0d xmllint --pretty crashed without following numeric argument
https://bugzilla.gnome.org/show_bug.cgi?id=674789

We need to check for NULL argument before calling atoi()
2013-08-29 16:44:33 +08:00
Nick Wellnhofer
e8de99f90c Fix XPath expressions of the form '@ns:*'
Use namespace for match-all queries on the attribute axis.
2013-08-05 01:26:25 +02:00
Nick Wellnhofer
b4bcba23f6 Fix XPath '//' optimization with predicates
My attempt to optimize XPath expressions containing '//' caused a
regression reported in bug #695699. This commit disables the
optimization for expressions of the form '//foo[predicate]'.
2013-08-05 00:15:11 +02:00
Daniel Veillard
ff76eb28c7 Clear up a potential NULL dereference
https://bugzilla.gnome.org/show_bug.cgi?id=705399

if ctxt->node_seq.buffer is null then ctxt->node_seq.maximum ought
to be zero but it's better to clarify the check in the code directly.
2013-08-03 22:25:13 +08:00
Gaurav
a885f13a67 Fix a possible NULL dereference
https://bugzilla.gnome.org/show_bug.cgi?id=705400
In case of allocation error the pointer was dereferenced before the
test for a failure
2013-08-03 22:16:02 +08:00
Denis Pauk
e28c8a1ace #705267 - add additional defines checks for support "./configure --with-minimum"
https://bugzilla.gnome.org/show_bug.cgi?id=705267
2013-08-03 22:00:17 +08:00
Daniel Veillard
717042d2ae Avoid crash if allocation fails
https://bugzilla.gnome.org/show_bug.cgi?id=704527
xmlSchemaNewValue() may fail on OOM error
2013-07-22 14:28:20 +08:00
Daniel Veillard
ccc9cf9276 Fix a wrong test
https://bugzilla.gnome.org/show_bug.cgi?id=704530

Arg is an array on the stack and can't be NULL
2013-07-22 14:24:16 +08:00
Daniel Veillard
b9e4d5b639 Remove occasional leading space in XPath number formatting
https://bugzilla.gnome.org/show_bug.cgi?id=704528

Somehow snprintf "%*.*e" can generate a leading space, remove it
2013-07-22 13:21:31 +08:00
Daniel Veillard
81b961788a Two smal namespace tweaks
An improvement of the documentation, and an extra safety check
for xmlSetNs()
2013-07-22 13:01:11 +08:00
Daniel Veillard
b98c6a0ac6 Fix handling of mmap errors
https://bugzilla.gnome.org/show_bug.cgi?id=702320

as raised by Gaurav <ya1gaurav@gmail.com>
2013-07-12 12:08:40 +08:00
Arfrever Frehtes Taifersar Arahesis
6dd7775f35 Another round of fixes for older versions of Python 2013-07-12 11:18:11 +08:00
Daniel Veillard
e71dce18a1 Catch malloc error and exit accordingly
As pointed privately by Bill Parker <wp02855@gmail.com>
2013-07-11 15:41:22 +08:00
Alexandre Rostovtsev
6c9c611bee python: fix drv_libxml2.py for python3 compatibility
https://bugzilla.gnome.org/show_bug.cgi?id=703979
2013-07-11 15:16:02 +08:00
Ami Fischman
33a25af71f missing else in xlink.c
Obviously forgotten
2013-07-02 09:47:26 +08:00
Armin K
6eea2f2c60 python: Fix compiler warnings when building python3 bindings 2013-06-03 22:03:28 +02:00
Daniel Veillard
dcc1950319 Fix a parsing bug on non-ascii element and CR/LF usage
https://bugzilla.gnome.org/show_bug.cgi?id=698550

Somehow the behaviour of the internal parser routine changed
slightly when encountering CR/LF, which led to a bug when
parsing document with non-ascii Names
2013-05-22 22:56:45 +02:00
Daniel Veillard
e38217ae82 Forgot to document 2.9.1 release, regenerate docs 2013-05-10 15:40:13 +08:00
Daniel Veillard
63588f476f Fix a regression in xmlGetDocCompressMode()
The switch to xzlib had for consequence that the compression
level of the input was not gathered anymore in ctxt->input->buf,
then the parser compression flags was left to -1 and propagated
to the resulting document.
Fix the I/O layer to get compression detection in xzlib,
then carry it in the input buffer and the resulting document

  This should fix
    https://lsbbugs.linuxfoundation.org/show_bug.cgi?id=3456
2013-05-10 14:01:46 +08:00
Aleksey Sanin
1ba80b7b6f properly quote the namespace uris written out during c14n 2013-05-09 16:02:16 +00:00
Daniel Veillard
a75a009d12 xmllint --memory should fail on empty files
Exposed by https://bugzilla.gnome.org/show_bug.cgi?id=699896
when doing analysis but a priori unrelated.
2013-05-08 13:45:48 +08:00
Alexey Neyman
0b86537dfa Remove premature XInclude check on URI being relative
As it gives false negatives, see
  https://mail.gnome.org/archives/xml/2013-April/msg00023.html
2013-05-06 10:20:18 +08:00
Nikolay Sivov
d4a5d98139 Cast encoding name to char pointer to match arg type 2013-05-06 09:00:56 +08:00
Petr Sumbera
722923bc9b Fix for compilation with python 2.6.8
Remap PyCapsule to PyCObject based on the macro being available
instead of using the python version
2013-05-03 22:25:38 +08:00
dcb
10ec19ab0a Fix missing break on last() function for attributes
pointed out by cppcheck
2013-05-02 16:11:46 +08:00
Romain Bondue
960f0e2756 Do not URI escape in server side includes 2013-04-23 20:44:55 +08:00
Alexander Pastukhov
704d8c5e9a Fix an error in xmlCleanupParser
https://bugzilla.gnome.org/show_bug.cgi?id=698582

xmlCleanupParser calls xmlCleanupGlobals() and then
xmlResetLastError() but the later reallocate the global
data freed by previous call. Just swap the two calls.
2013-04-23 13:02:11 +08:00
Daniel Veillard
f4e5a6994e Release of libxml2-2.9.1
* configure.in: bumped version
* doc/*: updated the symbols file and regenerated
2013-04-19 15:36:36 +08:00
Daniel Veillard
c0a8dd14f8 Fix a linking error for python bindings
Showing up apparently in Debian BTS distro
https://bugzilla.gnome.org/show_bug.cgi?id=685515
2013-04-19 15:02:33 +08:00
Jüri Aedla
9ca816b3a6 Fix a couple of return without value
Error introduced in previous commit !
2013-04-16 22:00:13 +08:00
Daniel Franke
b123711189 Improve the hashing functions 2013-04-12 18:53:53 +08:00
Daniel Veillard
e50ba8164e Improve handling of xmlStopParser()
Add a specific parser error
Try to stop parsing as quickly as possible
2013-04-11 15:54:51 +08:00