| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
By always setting flush=TRUE when doing multiple reads, ICU
will not correctly handle truncated utf8 chars across read
boundaries.
The fix is to set flush=TRUE only on final read, and to
provide a pivot buffer which is maintained by libxml
between calls to ucnv_convertEx.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a character can't be represented in the output encoding, it is
converted to a character reference. This used to to replace the
character in the input stream by calling xmlBufAddHead or
xmlBufferAddHead. These functions shifted the entire input array
around, leading to quadratic performance when converting a run of
non-representable characters. This is most pronounced when dumping to
memory.
Output the charref directly instead.
Found with libFuzzer.
|
|
|
|
|
| |
Introduce static functions xmlEncInputChunk and xmlEncOutputChunk
that handle the internal/iconv/ICU branching.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=705267
|
|
|
|
|
|
|
|
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=692915
the new set of converting functions tried to limit the encoding
conversion of the raw buffer to the consumption one to work in
a more progressive fashion. Unfortunately this was bad for
performances and led to errors on progressive parsing when
a very large chunk was close to the end of the document. Fix
the new internal function and switch back to the old way of
converting. Fix another bug in the process.
|
|
|
|
|
| |
http://en.wikipedia.org/wiki/EBCDIC_037
as it is another variat of EBCDIC
|
|
|
|
| |
Remove all space before tabs and space and tabs at end of lines.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Various cleanups
* configure.in: force regeneration of APIs in my environment
* buf.c buf.h enc.h encoding.c include/libxml/tree.h
include/libxml/xmlerror.h save.h tree.c: various comment cleanups
pointed by apibuild
* doc/apibuild.py: added the 3 new internal headers in the excludes
* doc/libxml2-api.xml doc/libxml2-refs.xml: regenerated the API
* doc/symbols.xml: listing new entry points for 2.9.0
* doc/devhelp/*: regenerated
|
|
|
|
|
|
| |
* encoding.c: adds xmlCharEncFirstLineInput, xmlCharEncInput and
xmlCharEncOutput
* enc.h: the functions are not made public but added to this new header
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a node is dumped with a new encoding, we may encounter characters
that are not supported in the new encoding. libxml2 handles this by
replacing the character with character references, but in some encodings
this can result in an infinite loop when the character references
themselves contain unsupported characters.
This fixes the infinite loop by undoing a character reference substitution
when it cannot be inserted, and returning an encoder error.
This bug was noticed when looking into an infinite loop bug report for
the Ruby Nokogiri project. The original bug report, "nokogiri process
hangs on call to inner_html" is here:
https://github.com/tenderlove/nokogiri/issues/400
|
|
|
|
|
| |
this off by one error doesn't seems to reproduce on linux
but the error is real.
|
|
|
|
|
| |
This is not configured in by default but after some serious massaging
incorporate that patch from Chromium/Chrome.
|
|
|
|
|
| |
Changing semantic of xmlCharEncInFunc() wasn't the proper way to
do this, better change UTF8ToISO8859x() appropriately
|
|
|
|
| |
Done while chasing previous bug
|
|
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=630140
Fix the bug, which happen when using the embedded converters and
not iconv
|
|
|
|
|
| |
* SAX2.c encoding.c parser.c xmlschemas.c: a few more safety checks
* relaxng.c: remove an unused intitialization
|
|
|
|
|
| |
* encoding.c parser.c relaxng.c runsuite.c tree.c xmlreader.c
xmlschemas.c: nothing really serious but better safe than sorry
|
|
|
|
|
|
|
| |
* encoding.c parser.c parserInternals.c: when we autodetect an encoding
but it's actually not completely compatible with the one declared
great care must be taken to not convert more than just the first line.
Led to some refactoring, more private functions and a bit of cleanup.
|
|
|
|
| |
* encoding.c: the iconv converter is sometimes only found as "EBCDIC-US"
|
|
|
|
|
|
|
|
|
|
|
| |
* include/libxml/tree.h tree.c: make a new kind of buffer where
shrinking and adding in head can avoid reallocation or full
buffer memmoves
* encoding.c xmlIO.c: use the new kind of buffers for output
buffers
Daniel
svn path=/trunk/; revision=3787
|
|
|
|
|
|
|
|
| |
* encoding.c: buffer may not be large enough to convert to
UCS4, patch from Christian Fruth , fixes #504015
Daniel
svn path=/trunk/; revision=3727
|
|
|
|
|
|
|
|
|
|
|
| |
* encoding.c: poblem with encoding detection for UTF-16 reported by
Ashwin and found by Bill
* test/valid/dtds/utf16b.ent test/valid/dtds/utf16l.ent
test/valid/UTF16Entity.xml result/valid/UTF16Entity.xml*: added
the example to the regression tests
Daniel
svn path=/trunk/; revision=3700
|
|
|
|
|
|
|
|
| |
* config.h.in configure.in encoding.c: patch from Roumen Petrov
to detect if iconv() needs a const for the second parameter
Daniel
svn path=/trunk/; revision=3693
|
|
|
|
|
|
|
|
|
|
|
|
| |
* encoding.c: Fixed typo in xmlCharEncFirstLine pointed out
by Mark Rowe (bug #440159)
* include/libxml/xmlversion.h.in: Added check for definition of
_POSIX_C_SOURCE to avoid warnings on Apple OS/X (patch from
Wendy Doyle and Mark Rowe, bug #346675)
* schematron.c, testapi.c, tree.c, xmlIO.c, xmlsave.c: minor
changes to fix compilation warnings - no change to logic.
svn path=/trunk/; revision=3618
|
|
|
|
|
|
|
| |
* HTMLparser.c: remove a warning
* encoding.c: check with uppercase for AIX iconv() should fix #352644
* doc/examples/Makefile.am: partially handle one bug report
Daniel
|
|
|
|
|
|
| |
* encoding.c: fixing bug #340398 xmlCharEncOutFunc writing to
input buffer
Daniel
|
|
|
|
|
|
| |
* c14n.c encoding.c xmlschemas.c xpath.c xpointer.c: fix a few
warning raised by gcc-4.1 and latests changes
Daniel
|
|
|
|
|
|
| |
* SAX2.c catalog.c encoding.c entities.c example/gjobread.c
python/libxml.c: more cleanups based on coverity reports.
Daniel
|
|
|
|
|
|
|
|
|
| |
* encoding.c parserInternals.c: avoid passing a char[] as snprintf
first argument.
* threads.c include/libxml/threads.h: implemented xmlIsThreadsEnabled()
based on Andrew W. Nosenko idea.
* doc/* elfgcchack.h: regenerated the API
Daniel
|
|
|
|
|
|
| |
* encoding.c: applied the patch suggested #309565 which can avoid
looping in error conditions.
Daniel
|
|
|
|
|
|
|
| |
* encoding.c error.c include/libxml/xmlerror.h: finally converted
the encoding module to the common error reporting mechanism
* doc/* doc/html/libxml-xmlerror.html: rebuilt
Daniel
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
| |
* encoding.c: fix unitinialized variable in not frequently used
code bug #172182
Daniel
|
|
|
|
|
|
|
| |
* encoding.c: removed a static buffer in xmlByteConsumed(),
as pointed by Ben Maurer, fixes #170086
* xmlschemas.c: remove a potentially uninitialized pointer warning
Daniel
|
|
|
|
|
|
|
|
|
|
| |
* encoding.c: fix the comment to describe the real return values
* pattern.c xpath.c include/libxml/pattern.h: lot of work on
the patterns, pluggin in the XPath default evaluation, but
disabled right now because it's not yet good enough for XSLT.
pattern.h streaming API are likely to be changed to handle
relative and absolute paths in the same expression.
Daniel
|
|
|
|
|
|
| |
* Makefile.am: forgot a $(srcdir)
* encoding.c: stupid error wrong name #157976
Daniel
|
|
|
|
|
| |
* encoding.c: fixed a regression in iconv support.
Daniel
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gentest.py testapi.c: autogenerate a minimal NULL value sequence
for unknown pointer types
* HTMLparser.c SAX2.c chvalid.c encoding.c entities.c parser.c
parserInternals.c relaxng.c valid.c xmlIO.c xmlreader.c
xmlsave.c xmlschemas.c xmlschemastypes.c xmlstring.c xpath.c
xpointer.c: This uncovered an impressive amount of entry points
not checking for NULL pointers when they ought to, closing all
the open gaps.
Daniel
|
|
|
|
|
|
|
| |
* encoding.c doc/examples/testWriter.c: Fixed bug #153937, making
sure the conversion functions return the number of byte written.
Had to fix one of the examples.
Daniel
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* encoding.c: applied fixes for the UTF8ToISO8859x transcoding
routine suggested by Mark Itzcovitz
|
|
|
|
|
|
|
|
|
| |
* SAX2.c, encoding.c, error.c, parser.c, tree.c, uri.c, xmlIO.c,
xmlreader.c, include/libxml/tree.h: many further little changes
for OOM problems. Now seems to be getting closer to "ok".
* testOOM.c: added code to intercept more errors, found more
problems with library. Changed method of flagging / counting
errors intercepted.
|
|
|
|
|
| |
* encoding.c: small patch to try to fix a warning with Sun One compiler
Daniel
|
|
|
|
|
| |
* encoding.c: small patch removing a warning with MS compiler.
Daniel
|
|
|
|
|
|
|
|
|
|
| |
* parserInternals.c xmlIO.c encoding.c include/libxml/parser.h
include/libxml/xmlIO.h: added xmlByteConsumed() interface
* doc/*: updated the benchmark rebuilt the docs
* python/tests/Makefile.am python/tests/indexes.py: added a
specific regression test for xmlByteConsumed()
* include/libxml/encoding.h rngparser.c tree.c: small cleanups
Daniel
|
|
|
|
|
|
|
|
| |
* encoding.c: applied patch supplied by Christophe Dubach
to fix problem with --with-minimum configuration
(bug 133773)
* nanoftp.c: fixed potential buffer overflow problem,
similar to fix just applied to nanohttp.c.
|