1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-01-28 17:47:00 +03:00

649 Commits

Author SHA1 Message Date
Daniel Veillard
a8f09ce8d3 cleanup entity pushing error handling based on a patch from Ashwin daniel
* include/libxml/parserInternals.h parser.c: cleanup entity
  pushing error handling based on a patch from Ashwin
daniel

svn path=/trunk/; revision=3779
2008-08-27 13:02:01 +00:00
Daniel Veillard
8915c150b5 strengthen some of the internal parser limits, add an XML_PARSE_HUGE
* include/libxml/parser.h parser.c xmllint.c: strengthen some
  of the internal parser limits, add an XML_PARSE_HUGE option
  to bypass them all. More internal parser limits will still need
  to be added.
Daniel

svn path=/trunk/; revision=3777
2008-08-26 13:05:34 +00:00
Daniel Veillard
f4f4e4853a rework the patch to avoid some ABI issue with people allocating entities
* include/libxml/entities.h entities.c SAX2.c parser.c: rework
  the patch to avoid some ABI issue with people allocating
  entities structure directly
Daniel

svn path=/trunk/; revision=3773
2008-08-25 08:57:48 +00:00
Daniel Veillard
4bf899bf1b fix for CVE-2008-3281 Daniel
* include/libxml/parser.h include/libxml/entities.h entities.c
  parserInternals.c parser.c: fix for CVE-2008-3281
Daniel

svn path=/trunk/; revision=3772
2008-08-20 17:04:30 +00:00
Daniel Veillard
ae0765b681 more progresses against the official regression tests small cleanup for
* 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
2008-07-31 19:54:59 +00:00
Daniel Veillard
373345764b added a skipped list, insert rmt-ns10-035 improve 'make check' clean up
* runxmlconf.c: added a skipped list, insert rmt-ns10-035
* Makefile.am: improve 'make check'
* include/libxml/xmlerror.h parser.c: clean up namespace errors
  checking and reporting, errors when a document is labelled
  as UTF-16 while it is parsed as UTF-8 and no encoding was given
  explicitely.
* result/errors/webdav.xml.*: some warnings are no recategorized
  as Namespace errors
Daniel

svn path=/trunk/; revision=3761
2008-07-31 08:20:02 +00:00
Daniel Veillard
40ec29a56f an XML-1.0 document can't load an 1.1 entity when using entities make sure
* parser.c include/libxml/xmlerror.h: an XML-1.0 document can't load
  an 1.1 entity
* runxmlconf.c: when using entities make sure we load them
Daniel

svn path=/trunk/; revision=3759
2008-07-30 12:35:40 +00:00
Daniel Veillard
051d52cb61 fix a bug not detecting cross entity comments probably when comment
* parser.c: fix a bug not detecting cross entity comments probably
  when comment parsing got optimized.
* Makefile.am: add make check
* runxmlconf.c: fix the log file name
Daniel

svn path=/trunk/; revision=3758
2008-07-29 16:44:59 +00:00
Daniel Veillard
7e5c3f481f add a C program to run the W3C test suite, work in progress add a new
* runxmlconf.c Makefile.am: add a C program to run the W3C test
  suite, work in progress
* xmllint.c: add a new option --oldxml10 to use the old parser
* parser.c: fix the XML_PARSE_OLD10 processing of the new option
  and a bug in version parsing
Daniel

svn path=/trunk/; revision=3757
2008-07-29 16:12:31 +00:00
Daniel Veillard
34e3f64191 implement XML-1.0 5th edition, add parser option XML_PARSE_OLD10 to stick
* include/libxml/parser.h include/libxml/xmlerror.h parser.c:
  implement XML-1.0 5th edition, add parser option XML_PARSE_OLD10
  to stick to old behaviour
* testapi.c gentest.py: modified slightly and regenerated
* Makefile.am: add testchar
Daniel

svn path=/trunk/; revision=3755
2008-07-29 09:02:27 +00:00
Daniel Veillard
2135fc2d96 improve the *Recover* functions documentation Daniel
* parser.c: improve the *Recover* functions documentation
Daniel

svn path=/trunk/; revision=3731
2008-04-04 16:10:51 +00:00
Daniel Veillard
6ccc56df12 patch from Mark Rowe fixing BOM or encoding detection in external parsed
* parser.c: patch from Mark Rowe fixing BOM or encoding detection
  in external parsed entities, should fix #440415
Daniel

svn path=/trunk/; revision=3730
2008-04-03 12:59:06 +00:00
Daniel Veillard
a4ba09d725 more realloc problems pointed out by Ashwin Daniel
* parser.c: more realloc problems pointed out by Ashwin
Daniel

svn path=/trunk/; revision=3724
2008-04-03 06:24:04 +00:00
Daniel Veillard
68b6e02bfd lot of out of memory handling fixes from Ashwin work around a problem with
* parser.c: lot of out of memory handling fixes from Ashwin
* elfgcchack.h doc/elfgcchack.xsl: work around a problem with xmlDllMain
* include/libxml/threads.h: indenting cleanups
Daniel

svn path=/trunk/; revision=3720
2008-03-31 09:26:00 +00:00
Daniel Veillard
05b37c6893 trying to clarify even more the xmlCleanupParser() use and the memory
* parser.c docs/*: trying to clarify even more the xmlCleanupParser()
  use and the memory documentation
Daniel

svn path=/trunk/; revision=3719
2008-03-31 08:27:07 +00:00
Daniel Veillard
dc1716010a changes based on Alex Khesin patch where xmlParseCharRef seems to not be
* parser.c: changes based on  Alex Khesin patch where xmlParseCharRef
  seems to not be checked correctly, fixes #520198
Daniel

svn path=/trunk/; revision=3718
2008-03-26 17:41:38 +00:00
Daniel Veillard
6a31b837e1 patch from Ashwin to avoid a problem of attribute redefinition in the DTD.
* parser.c: patch from Ashwin to avoid a problem of attribute
  redefinition in the DTD. Remove a warning too.
Daniel

svn path=/trunk/; revision=3717
2008-03-26 14:06:44 +00:00
Daniel Veillard
97c9ce2e99 fix various attribute normalisation problems reported by Ashwin this
* parser.c: fix various attribute normalisation problems reported
  by Ashwin
* result/c14n/without-comments/example-4
  result/c14n/with-comments/example-4: this impacted the result of
  two c14n tests :-\
* test/att9 test/att10 test/att11 result//att9* result//att10*
  result//att11*: added 3 specific regression tests coming from the
  XML spec revision and from Ashwin
Daniel

svn path=/trunk/; revision=3715
2008-03-25 16:52:41 +00:00
Daniel Veillard
8bf64aef50 fix a problem reported by Ashwin for system parameter entities referenced
* parser.c: fix a problem reported by Ashwin for system parameter
  entities referenced from entities in external subset, add a
  specific loading routine.
* test/valid/dtds/external.ent test/valid/dtds/external2.ent
  test/valid/t11.xml result/valid/t11.xml*: added the test to
  the regression suite
Daniel

svn path=/trunk/; revision=3713
2008-03-24 20:45:21 +00:00
Daniel Veillard
37d2d16c89 patch from Vasily Chekalkin fixes memory leaks, should fix 512647 Daniel
* parser.c xinclude.c: patch from Vasily Chekalkin fixes memory
  leaks, should fix 512647
Daniel

svn path=/trunk/; revision=3706
2008-03-14 10:54:00 +00:00
Daniel Veillard
d0d2f090dc fix handling of empty CDATA nodes as reported and discussed around #514181
* xmlsave.c parser.c: fix handling of empty CDATA nodes as 
  reported and discussed around #514181 and associated patches
* test/emptycdata.xml result/emptycdata.xml* 
  result/noent/emptycdata.xml: added a specific test in the
  regression suite.
Daniel

svn path=/trunk/; revision=3701
2008-03-07 16:50:21 +00:00
Daniel Veillard
ccc476f177 patch from Alex Khesin fixing CDATA output after a text node. fixed the
* xmlwriter.c: patch from Alex Khesin fixing CDATA output after
  a text node.
* parser.c: fixed the comment for xmlParserCleanup
* globals.c: fixed indentation
Daniel

svn path=/trunk/; revision=3699
2008-03-04 13:19:49 +00:00
Daniel Veillard
c707d0b765 fix a memeory leak in internal subset parsing with a fix from Ashwin add
* parser.c: fix a memeory leak in internal subset parsing with
  a fix from Ashwin
* test/errors/content1.xml result/errors/content1.xml*:
  add test to regressions
Daniel

svn path=/trunk/; revision=3680
2008-01-24 14:48:54 +00:00
Daniel Veillard
b3edafd72d avoid a warning on 64bits introduced earlier make more checking on the
* parser.c: avoid a warning on 64bits introduced earlier
* parserInternals.c: make more checking on the UTF-8 input
Daniel

svn path=/trunk/; revision=3676
2008-01-11 08:00:57 +00:00
Daniel Veillard
9e264adfb1 applied patch from Christian Schmidt fixing a column counter update
* parser.c: applied patch from Christian Schmidt fixing a 
  column counter update problem, fixes #472696
Daniel

svn path=/trunk/; revision=3670
2008-01-11 06:10:16 +00:00
Daniel Veillard
ac4118d5ca handle a erroneous parsing of attributes in case said attribute has been
* parser.c: handle a erroneous parsing of attributes in 
  case said attribute has been redeclared in the DTD with a
  different type
* hash.c: fix the hash scanner to not crash if a first element
  from the hash list is been removed in the callback
Daniel

svn path=/trunk/; revision=3669
2008-01-11 05:27:32 +00:00
Daniel Veillard
3dcd319a46 aligned xmlSAXUserParseMemory() to match xmlSAXUserParseFile() logic based
* parser.c: aligned xmlSAXUserParseMemory() to match 
  xmlSAXUserParseFile() logic based on Ashwin post, and ifdef
  cleanup
Daniel

svn path=/trunk/; revision=3649
2007-08-14 13:46:54 +00:00
Daniel Veillard
da62934715 fixed a parser bug where invalid char in comment may not be detected,
* parser.c: fixed a parser bug where invalid char in comment may
  not be detected, reported by Ashwin Sinha
* test/errors/comment1.xml result/errors/comment1.xml*: added
  the example to the regression suite
Daniel

svn path=/trunk/; revision=3647
2007-08-01 07:49:06 +00:00
Daniel Veillard
40e4b216da Probably needed too to avoid the same problem on PIs, Daniel
svn path=/trunk/; revision=3636
2007-06-12 14:46:40 +00:00
Daniel Veillard
dfac946c3d fixed the push mode when a big comment occurs before an internal subset,
* parser.c: fixed the push mode when a big comment occurs before
  an internal subset, should close bug #438835
* test/comment6.xml result//comment6.xml*: added a special
  test in the regression suite
Daniel

svn path=/trunk/; revision=3635
2007-06-12 14:44:32 +00:00
Daniel Veillard
b9e5acc490 fix bug #414846 where invalid characters in attributes would sometimes not
* parser.c: fix bug #414846 where invalid characters in attributes
  would sometimes not be detected.
* test/errors/attr4.xml result/errors/attr4.xml*: added a specific
  test case to the regression tests
Daniel

svn path=/trunk/; revision=3634
2007-06-12 13:43:00 +00:00
Daniel Veillard
2e6208651d fixed bug #366161, trivially added the check in xmlCtxtReset() Daniel
* parser.c: fixed bug #366161, trivially added the check in
  xmlCtxtReset()
Daniel

svn path=/trunk/; revision=3626
2007-06-12 08:18:21 +00:00
Daniel Veillard
1ca1be2ad5 tried to fix an error problem on entity content failure reported by
* parser.c: tried to fix an error problem on entity content failure
  reported by Michael Day
Daniel

svn path=/trunk/; revision=3613
2007-05-02 16:50:03 +00:00
Daniel Veillard
fde5b0b9ca small cleanup to avoid packaging .svn applied patch to avoid a problem in
* Makefile.am: small cleanup to avoid packaging .svn
* libxml.h threads.c parser.c: applied patch to avoid a problem
  in concurrent threaded initialization fix from Ted Phelps
Daniel

svn path=/trunk/; revision=3582
2007-02-12 17:31:53 +00:00
William M. Brack
bf9a73d2bb fixed mistake in previous commit (ChangeLog is correct)
svn path=/trunk/; revision=3581
2007-02-09 00:07:07 +00:00
William M. Brack
d46c1ca3fc added a GROW when parsing complex comments (bug #405666) added a hack to
* parser.c: added a GROW when parsing complex comments (bug #405666)
* gentest.py, testapi.c: added a hack to prevent destruction of any
  param with 'destroy' in it's description (i.e. param destroyed by
  the routine under test, so shouldn't be destroyed by testapi)
* xmlreader.c: added freeing of 'input' param even on error

svn path=/trunk/; revision=3579
2007-02-08 23:34:34 +00:00
Daniel Veillard
602f2bd01a patch from Michael Day on standalone and XML declaration detection, and
* parser.c include/libxml/tree.h: patch from Michael Day on standalone
  and XML declaration detection, and associated documentation change
Daniel
2006-12-04 09:26:04 +00:00
Daniel Veillard
dcec672439 fix the patch for unreproductable #343000 but also fix a line/column
* parser.c: fix the patch for unreproductable #343000 but
  also fix a line/column keeping error
* result/errors/attr1.xml.err result/errors/attr2.xml.err
  result/errors/name.xml.err result/errors/name2.xml.err
  result/schemas/anyAttr-processContents-err1_0_0.err
  result/schemas/bug312957_1_0.err: affected lines in error output
  of the regression tests
Daniel
2006-10-15 20:32:53 +00:00
Daniel Veillard
02a49638a5 fix a problem in xmlSplitQName resulting in bug #334669 Daniel
* parser.c: fix a problem in xmlSplitQName resulting in bug #334669
Daniel
2006-10-13 12:42:31 +00:00
Daniel Veillard
402b34475d fixed xmlIOParseDTD handling of @input in error case, Should fix #335085
* parser.c: fixed xmlIOParseDTD handling of @input in error case,
  Should fix #335085
* testapi.c: reset the http_proxy env variable to not waste time
  on regression tests
Daniel
2006-10-13 10:28:21 +00:00
Daniel Veillard
1114d000f3 fixed the heuristic used when trying to detect mixed-content elememts if
* parser.c: fixed the heuristic used when trying to detect mixed-content
  elememts if the parser wants to treat ignorable whitespaces
  in a non-standard way, should fix bug #300263
Daniel
2006-10-12 16:24:35 +00:00
Daniel Veillard
a9557952ed fix a first arg error in SAX callback pointed out by Mike Hommey, and
* parser.c: fix a first arg error in SAX callback pointed out by
  Mike Hommey, and another one still hanging around. Should fix #342737
Daniel
2006-10-12 12:53:15 +00:00
Daniel Veillard
a37a6ad91a trying to fix entities behaviour when using SAX, had to extend entities
* include/libxml/entities.h entities.c SAX2.c parser.c: trying to
  fix entities behaviour when using SAX, had to extend entities
  content and hack on the entities processing code, but that should
  fix the long standing bug #159219
Daniel
2006-10-10 20:05:45 +00:00
Daniel Veillard
2937b3ac94 applied and slightly modified a patch from Michael Day to keep _private in
* parser.c: applied and slightly modified a patch from Michael Day to
  keep _private in the parser context when parsing external entities
Daniel
2006-10-10 08:52:34 +00:00
Daniel Veillard
4a9fe385c7 applied patch from Ben Darnell on #321545, I could not reproduce the
* parser.c: applied patch from Ben Darnell on #321545, I could not
  reproduce the problem but 1/ this is safe 2/ it's better to be safe.
Daniel
2006-09-19 12:44:35 +00:00
Rob Richards
a02f199d7b xmlTextConcat works with comments and PI nodes (bug #355962). fix
* tree.c: xmlTextConcat works with comments and PI nodes (bug #355962).
* parser.c: fix resulting tree corruption when using XML namespace
  with existing doc in xmlParseBalancedChunkMemoryRecover.
2006-09-16 14:04:26 +00:00
Daniel Veillard
75acfeea32 applied patch from Andrew W. Nosenko to expose if zlib support was
* configure.in parser.c xmllint.c include/libxml/parser.h
  include/libxml/xmlversion.h.in: applied patch from Andrew W. Nosenko
  to expose if zlib support was compiled in, in the header, in the
  feature API and in the xmllint --version output.
Daniel
2006-07-13 06:29:56 +00:00
Daniel Veillard
dbcbbd2657 try to fix the crash raised by the parser in recover mode as pointed by
* parser.c: try to fix the crash raised by the parser in
  recover mode as pointed by Ryan Phillips
Daniel
2006-06-18 19:55:20 +00:00
Daniel Veillard
3b1478b7e8 fix the error message for invalid code point in content c.f. bug #339311
* parser.c: fix the error message for invalid code point in content
  c.f. bug #339311
Daniel
2006-04-24 08:50:10 +00:00
Daniel Veillard
30e7607b7a a bunch of small cleanups based on coverity reports. Daniel
* HTMLparser.c parser.c parserInternals.c pattern.c uri.c: a bunch
  of small cleanups based on coverity reports.
Daniel
2006-03-09 14:13:55 +00:00