[xml] This mailing list will be retired by the end of Oct 2022

2022-10-21 Thread Nick Wellnhofer via xml
According to [1], GNOME's Mailman platform is being decommissioned which probably means that this mailing list will go away soon. Nick [1] https://mail.gnome.org/archives/foundation-list/2022-October/msg2.html ___ xml mailing list, project page

[xml] Release of libxml2 2.10.3

2022-10-14 Thread Nick Wellnhofer via xml
Version 2.10.3 of libxml2 is available at: https://download.gnome.org/sources/libxml2/2.10/ ### Security - [CVE-2022-40304] Fix dict corruption caused by entity reference cycles - [CVE-2022-40303] Fix integer overflows with XML_PARSE_HUGE - Fix overflow check in SAX2.c ### Portability -

[xml] Release of libxml2 2.10.2

2022-08-29 Thread Nick Wellnhofer via xml
Version 2.10.2 of libxml2 is available at: https://download.gnome.org/sources/libxml2/2.10/ This should really fix the build with Python 3.10. ### Improvements - Remove set-but-unused variable in xmlXPathScanName - Silence -Warray-bounds warning ### Build system - build: require

[xml] Release of libxml2 2.10.1

2022-08-25 Thread Nick Wellnhofer via xml
Version 2.10.1 of libxml2 is available at: https://download.gnome.org/sources/libxml2/2.10/ This fixes some showstoppers reported by early adopters of 2.10.0. Thsnk for the reports! ### Regressions - Fix xmlCtxtReadDoc with encoding ### Bug fixes - Fix HTML parser with threads and

[xml] Release of libxml2 2.10.0

2022-08-17 Thread Nick Wellnhofer via xml
Version 2.10.0 of libxml2 is available at: https://download.gnome.org/sources/libxml2/2.10/ In this release, I started to remove a lot of old cruft like build systems for outdated platforms which haven't been touched in 10+ years. The Docbook parser module has been removed completely. As

Re: [xml] How can I parse an XML file whose filesystem path is a Unicode string?

2022-08-02 Thread Nick Wellnhofer via xml
On 31/07/2022 17:40, Paul Kinnucan via xml wrote: My Xerces-c implementation uses a custom entity resolver to resolve file entities. I might need a custom entity resolver to fix the problem with the libxml2 implementation. However, libxml2 does not seem to support custom entity resolvers. At

Re: [xml] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43743

2022-06-27 Thread Nick Wellnhofer via xml
On 24/06/2022 21:48, enh via xml wrote: did anyone report https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43743 to libxml2 directly? No, this wasn't reported. For now, these issues should be reported to the libxml2 bug

[xml] Release of libxml2 2.9.14

2022-05-02 Thread Nick Wellnhofer via xml
Version 2.9.14 of libxml2 is available at: https://download.gnome.org/sources/libxml2/2.9/ Note that starting with 2.9.13, libxml2 tarballs are published on download.gnome.org instead of ftp.xmlsoft.org. ### Security - [CVE-2022-29824] Integer overflow in xmlBuf and xmlBuffer - Fix

[xml] Is anyone still using XPointer ranges?

2022-04-07 Thread Nick Wellnhofer via xml
I'm curious if there are people out there who still use XPointer ranges, specifically things like the range-to XPath extension function. This part of the code base is extremely buggy and the latest spec seems to be a Working Draft from 2002 which was never finished [1]. The xpointer() scheme is

Re: [xml] Euro sign in xml:id

2022-04-06 Thread Nick Wellnhofer via xml
On 06/04/2022 00:40, Einhard Leichtfuß wrote: I noticed that xmllint complains about the Euro sign ("€") in an xml:id. - "validity error : xml:id : attribute value € is not an NCName" The W3C's XML specification, however, seems to allow this: - https://www.w3.org/TR/xml-id/#processing -

Re: [xml] Support libxml2 and libxslt on Open Collective

2022-02-27 Thread Nick Wellnhofer via xml
On 23/02/2022 23:39, Eberhard wrote: Dumb question. How do I contribute in dollars? I get Euros and no option to change. E Everything should be set to USD now. Nick ___ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org

Re: [xml] Release of libxml2 2.9.13

2022-02-23 Thread Nick Wellnhofer via xml
On 23/02/2022 08:17, Stefan Behnel wrote: Could you make the archives available in a (second) format that matches all (previous) releases? The archives are automatically converted to .tar.xz when uploaded to the GNOME download server. I have no influence on that. Personally, I'd prefer

Re: [xml] Release of libxml2 2.9.13

2022-02-21 Thread Nick Wellnhofer via xml
On 21/02/2022 14:57, Mike Dalessio wrote: I'm not asking specifically for a CVSS score for this vulnerability, and I'm certainly not asking you to create a CVE for every memory fix that's found. I'm only asking for a more accessible explanation of the conditions under which an application

[xml] Support libxml2 and libxslt on Open Collective

2022-02-21 Thread Nick Wellnhofer via xml
Hello, You can now support libxml2 and libxslt financially on Open Collective: https://opencollective.com/libxml2 All donations go through the Open Source Collective, a non-profit organization providing financial and legal infrastructure for thousands of open source projects.

Re: [xml] Release of libxml2 2.9.13

2022-02-20 Thread Nick Wellnhofer via xml
On 20/02/2022 20:50, Mike Dalessio wrote: Is there any additional information about CVE-2022-23308 (other than the commit log) that would help downstream projects triage? Was there a CVSS score calculated or severity assigned? In this case, the CVE record is managed by a third party. It

[xml] Release of libxml2 2.9.13

2022-02-20 Thread Nick Wellnhofer via xml
Version 2.9.13 of libxml2 is available at: https://download.gnome.org/sources/libxml2/2.9/ Note that starting with this release, libxml2 tarballs are published on download.gnome.org instead of ftp.xmlsoft.org. ### Security - [CVE-2022-23308] Use-after-free of ID and IDREF attributes

[xml] Intent to remove build systems for outdated platforms

2022-02-16 Thread Nick Wellnhofer via xml
I plan to remove several directories from the libxml2 repo containing build systems for outdated platforms. VxWorks https://gitlab.gnome.org/GNOME/libxml2/-/tree/master/VxWorks Bakefile https://gitlab.gnome.org/GNOME/libxml2/-/tree/master/bakefile MacOS 9

Re: [xml] Schema validation skipping IDC

2022-02-09 Thread Nick Wellnhofer via xml
On 09/02/2022 14:48, Stefan de Konink wrote: On Wednesday, February 9, 2022 1:25:41 PM CET, Nick Wellnhofer wrote: I'm always reluctant to add new features, especially if it sounds like it only solves a problem for a single user. Do you want to disable checking of identity constraints

Re: [xml] Schema validation skipping IDC

2022-02-09 Thread Nick Wellnhofer via xml
On 01/02/2022 13:39, Stefan de Konink wrote: Hi, Would a patch be accepted that would create an option to disable identity constraints at runtime? Use case: only syntactically validate a file. I'm always reluctant to add new features, especially if it sounds like it only solves a problem

Re: [xml] Resuming maintenance

2022-01-14 Thread Nick Wellnhofer via xml
On 12/01/2022 17:30, Stefan de Konink wrote: If you're seeing degraded performance on large documents, it's likely another issue with quadratic runtime. Fixing such issues algorithmically should typically yield much better results than trying to work around them with multi-threading. What

Re: [xml] Resuming maintenance

2022-01-12 Thread Nick Wellnhofer via xml
On 11/01/2022 11:38, Daniel Veillard wrote: So you want to reintegrate libxml2 within the GNOME framework ? TBH now that I have very limited bandwidth that's probably the right thing to do. I didn't mean the GNOME desktop environment itself, but the infrastructure that the GNOME Foundation

Re: [xml] Resuming maintenance

2022-01-12 Thread Nick Wellnhofer via xml
On 10/01/2022 20:47, Mike Dalessio wrote: Although I'm relieved, the potential loss of maintainers from the project was alarming. Perhaps another goal to consider for the year is to expand the pool of contributors and

Re: [xml] Resuming maintenance

2022-01-12 Thread Nick Wellnhofer via xml
On 10/01/2022 16:51, Stefan de Konink wrote: This is great news, thanks Google for acknowledging the importance of maintaining core open source products. Your previous improvements on XSD validation made a great difference, but from my prototype in Python (LXML) I assume that multithreaded

[xml] Resuming maintenance

2022-01-10 Thread Nick Wellnhofer via xml
Hello, Thanks to a donation from Google, I'm able to resume maintenance of libxml2 (and libxslt) for the remainder of 2022. My immediate plans are: - Make a bug fix release fixing many regressions. - Establish a new release schedule, possibly with multiple branches being maintained. - Move

Re: [xml] userdata for SAX parsing with schema validation

2022-01-03 Thread Nick Wellnhofer via xml
On 23/12/2021 20:14, Lara Blatchford wrote: Hi - I have a simple SAX handler set up, and schema validation errors are being caught by my structured error handler.  So far so good. It appears that the userdata argument to xmlSAXUserParseMemory /must/ be the xmlSchemaSAXPlugPtr returned by the

[xml] Stepping down

2021-07-22 Thread Nick Wellnhofer via xml
I never really asked for it but in the last years I became de-facto maintainer of both libxml2 and libxslt. Luckily, I was able to fund my involvement through Chrome VRP bug bounties and OSS-Fuzz integration rewards. Big thanks to Google for these outstanding programs. Unfortunately, returns

Re: [xml] Release of libxml2 2.9.11

2021-05-14 Thread Nick Wellnhofer via xml
On 13/05/2021 23:13, Stefan Behnel wrote: Difficult to say if this is an improvement or deliberate breakage. Technically, it's not a semantic change in the XML output, rather a byte level change in ignorable whitespace. But I'll need to look into it further to understand what the best adaptation

Re: [xml] warning: cast from 'unsigned char *' to 'unsigned short *'

2021-03-23 Thread Nick Wellnhofer via xml
On 23/03/2021 00:38, Jeffrey Walton via xml wrote: encoding.c:500:26: warning: cast from 'const unsigned char *' to 'unsigned short *' increases required alignment from 1 to 2 [-Wcast-align] unsigned short* in = (unsigned short*) inb; If the buffers are aligned, then you can use

Re: [xml] libxml2 2.9.10 and Hang after Testing parser : 61 of 70 functions

2021-03-22 Thread Nick Wellnhofer via xml
On 22/03/2021 05:21, Jeffrey Walton via xml wrote: I'm working on my old PowerMac G5, powerpc-apple-darwin9.8.0. I'm trying to build an updated OpenSSH. libxml2 2.9.10 is a distant dependency. First of all, it's great to hear that libxml2 compiled at all and that most of the tests seem to

Re: [xml] [PATCH] fix memory leak when xmlRegStatePush failed

2021-03-13 Thread Nick Wellnhofer via xml
On 12/01/2021 10:42, zhuyan (M) wrote: In the function xmlRegStatePush, if xmlMalloc or xmlRealloc fails, Yes, there are many issues that arise from poor handling of malloc failures. Fortunately, similar issues can be found quite effectively by changing the fuzzers to inject malloc

Re: [xml] xmlGetNodePath() returns invalid path for XML_DTD_NODE

2021-03-13 Thread Nick Wellnhofer via xml
On 08/02/2021 18:01, Christoph M. Becker wrote: On 08.02.2021 at 17:23, Nick Wellnhofer wrote: This should be fixed for other node types as well. Does the attached patch work for you? Yes, that works fine. Thank you! This is fixed in master now: https://gitlab.gnome.org/GNOME/libxml2

Re: [xml] about xmlReadMemory()

2021-03-03 Thread Nick Wellnhofer via xml
On 03/03/2021 09:30, nicolas bats wrote: Hi Nick, I've experimented with xmlReadIO and it's cool. this message just to check I'm doing right: -I register an xmlInputReadCallback of type: size_t myCallback(void* context, char* buffer, int length) -I do my stuff in the callback and if data I use

Re: [xml] about xmlReadMemory()

2021-03-02 Thread Nick Wellnhofer via xml
On 02/03/2021 16:28, nicolas bats via xml wrote: Hi, is there's a reason why xmlReadMemory () accepts int as the size of the array to transform to xmlDocPtr. no doubt there's one... That's simply a design mistake. The API was created

Re: [xml] xmlGetNodePath() returns invalid path for XML_DTD_NODE

2021-02-08 Thread Nick Wellnhofer via xml
On 28/01/2021 14:51, Christoph M. Becker via xml wrote: -if ((node == NULL) || (node->type == XML_NAMESPACE_DECL)) +if ((node == NULL) || (node->type == XML_NAMESPACE_DECL) +|| (node->type == XML_DTD_NODE)) return (NULL); This should be fixed for other node types as

Re: [xml] Issue in building for arm...

2021-01-18 Thread Nick Wellnhofer via xml
On 18/01/2021 12:30, Abu Muttalib via xml wrote: In file included from /usr/include/python2.7/Python.h:8:0,                  from libxml.c:15: /usr/include/python2.7/pyconfig.h:14:54: fatal error: arm-linux-gnueabihf/python2.7/pyconfig.h: No such file or directory compilation terminated.

Re: [xml] Constraint validation for huge documents

2021-01-05 Thread Nick Wellnhofer via xml
The XML Schemas code hasn't been actively maintained for more than 10 years, so it's unlikely to receive a helpful answer regarding the code. There was a recent patch which might help: https://gitlab.gnome.org/GNOME/libxml2/-/commit/faea2fa9b890cc329f33ce518dfa1648e64e14d6 Other than that,

Re: [xml] Fwd: Windows libxml2.lib missing?

2020-12-09 Thread Nick Wellnhofer via xml
On 09/12/2020 01:49, Pro Turm via xml wrote: do you know why the provided Windows binaries dont contain any .lib files? No .lib has been provided here http://xmlsoft.org/sources/win32/64bit/ It's explained in readme.txt. Nick

Re: [xml] [PATCH] encoding: fix memleak in xmlRegisterCharEncodingHandler()

2020-12-07 Thread Nick Wellnhofer via xml
On 07/12/2020 13:19, Xiaoming Ni wrote: The return type of xmlRegisterCharEncodingHandler() is void. The invoker cannot determine whether xmlRegisterCharEncodingHandler() is executed successfully. when nbCharEncodingHandler >= MAX_ENCODING_HANDLERS, the "handler" is not added to the array

Re: [xml] [PATCH] xmlschemastypes.c: xmlSchemaGetFacetValueAsULong add, check "facet->val"

2020-12-07 Thread Nick Wellnhofer via xml
On 07/12/2020 13:17, Xiaoming Ni wrote: The xmlSchemaGetFacetValueAsUlong() API is an external API. The validity of external input parameters must be strictly verified. Before accessing "facet->val->value", we need check whether "facet->val" is a null pointer. Signed-off-by: wuqing

Re: [xml] ping //Re: [PATCH] xmlschemastypes.c: xmlSchemaGetFacetValueAsULong add check "facet->val"

2020-12-06 Thread Nick Wellnhofer via xml
On 01/12/2020 08:05, Xiaoming Ni wrote: ping Your previous email didn't make it to the mailing list. On 2020/11/24 14:55, Xiaoming Ni wrote: The xmlSchemaGetFacetValueAsUlong() API is an external API. The validity of external input parameters must be strictly verified. Before accessing

Re: [xml] [PATCH] Fix xmlURIEscape memory leaks.

2020-11-09 Thread Nick Wellnhofer via xml
Merged here: https://gitlab.gnome.org/GNOME/libxml2/-/commit/7c06d99e1f4f853e3c5b307c0dc79c8a32a09855 Nick On 27/10/2020 19:33, enh via xml wrote: Found by running the fuzz/uri.c fuzzer under asan (internal Android bug 171610679). Always free `ret` when exiting on failure. I've moved the

Re: [xml] [PATCH] Fix xmlURIEscape memory leaks.

2020-11-06 Thread Nick Wellnhofer via xml
On 06/11/2020 00:54, enh via xml wrote: ping? (let me know if this should be a pull request somewhere instead...) Sending patches to the mailing list is fine. It might take another week or two, but the issue will be addressed eventually. Nick ___

Re: [xml] Why does libxml2 limit port numbers to 999,999,999?

2020-10-17 Thread Nick Wellnhofer via xml
On Oct 17, 2020, at 12:24 , Richard W.M. Jones via xml wrote: > It seems like libxml2 chose to do this for convenience rather than > correctness. Yes, this is an arbitrary limit introduced to avoid integer overflow. > I think it should accept port numbers at least up to > signed int (the type

Re: [xml] Fix character column number of XML parse error on line with closing tag of element with namespace preceding it

2020-08-09 Thread Nick Wellnhofer via xml
On Jun 15, 2020, at 17:29 , Frederic Vancraeyveldt wrote: > I traced the code and I have a suggested fix in libxml_parser.patch. Thanks, this should be fixed now with this commit: https://gitlab.gnome.org/GNOME/libxml2/-/commit/b82fa3dd26a72c89ced293d06269eb97bb252d76 > I also modified

Re: [xml] GCC 10 analyzer findings

2020-07-24 Thread Nick Wellnhofer
On 16/07/2020 11:49, Jeffrey Walton via xml wrote: I'm building libxml2-2.9.10 on Fedora 32 with GCC 10. GCC 10 includes the analyzer. The analyzer can be enabled by adding -fanalyze to CFLAGS and LDFLAGS. The analyzer is producing some use-after-free and double-free findings on libxml2-2.9.10.

Re: [xml] Question about xmlDoc->oldNs usage in php

2020-06-15 Thread Nick Wellnhofer
On 15/06/2020 05:04, Benjamin Eberlei wrote: Now I am wondering what oldNs is even used for here, it seems from the libxml code it is really only needed to "cache" a pointer to the xmlNs that represents "xml" and nothing more. No, the oldNs list is also appended to in `xmlDOMWrapStoreNs`. It

Re: [xml] [PATCH] win32: add "symbols" flag to configure.js

2020-05-04 Thread Nick Wellnhofer
On 10/04/2020 19:32, Michael Stahl wrote: On 10.03.20 12:16, Nick Wellnhofer wrote: Maybe we should simply add a feature to provide custom compiler and linker flags. okay i've played around with that now, result is attached... Merged here: https://gitlab.gnome.org/GNOME/libxml2/-/commit

Re: [xml] libxml2 self test failures on NetBSD

2020-03-21 Thread Nick Wellnhofer
> On Mar 21, 2020, at 08:03 , Jeffrey Walton via xml wrote: > > I'm building libxml2-2.9.10 from sources. I'm seeing some libxml2 self > test failures on NetBSD 8.1. > File ./test/ebcdic_566012.xml generated an error This issue was originally fixed with this commit:

Re: [xml] [PATCH] win32: add "symbols" flag to configure.js

2020-03-10 Thread Nick Wellnhofer
On 08/03/2020 17:40, Michael Stahl wrote: hi, we want an easier way to get PDB files for MSVC release builds for crashreporting purpose... There's also this GitLab issue: https://gitlab.gnome.org/GNOME/libxml2/issues/140 Maybe we should simply add a feature to provide custom compiler and

Re: [xml] precisionDecimal support

2020-02-15 Thread Nick Wellnhofer
On 24/01/2020 15:35, Constantin Dogaru via xml wrote: Would be open in accepting a contribution from Bloomberg that will add support for precisionDecimal in libxml2? To be clear, you're talking about this XSD extension datatype? https://www.w3.org/TR/xsd-precisionDecimal/ Technically,

Re: [xml] Memory leak problem

2019-11-27 Thread Nick Wellnhofer
Hi Eric, I'd use AddressSanitizer to debug this kind of problem. It's built into recent clang and gcc versions but probably doesn't support AIX. If you can produce a stand-alone test program that exhibits the memory leak, you could debug it under Linux, though. Another option is libxml2's

Re: [xml] DOM parser uses SAX2

2019-11-12 Thread Nick Wellnhofer
On 11/11/2019 19:59, Akash Opensource wrote: From test file I meant sample *.xml file that can be used to go for statement coverage. For example I got a *.xml file in test folder of libxml2 extracted source directory that contained a long element name more than 4000 characters and it was

Re: [xml] DOM parser uses SAX2

2019-11-11 Thread Nick Wellnhofer
On 11/11/2019 11:21, Akash Opensource via xml wrote: But while checking libxml2 code I saw the DOM parser making calls to functions in sax2.c . The event-based SAX parser is used to build a DOM tree. There's nothing special about that, just like you could walk a DOM tree to generate SAX

Re: [xml] [PATCH] xml2-config.in: fix regressions introduced by commit 2f2bf4b2c

2019-11-02 Thread Nick Wellnhofer
Thanks, applied here: https://gitlab.gnome.org/GNOME/libxml2/commit/29740ed12f96149e795b22a147ada80b8776c8b4 Nick > On Nov 2, 2019, at 13:07 , Dmitry V. Levin wrote: > > One of regressions introduced by commit > 2f2bf4b2caa1cb9a4a5039b7a44db101943382d1 aka v2.9.10-rc1~56 is that > cflags and

Re: [xml] Research about vulnerabilities

2019-10-29 Thread Nick Wellnhofer
On 29/10/2019 14:30, Raphael de Carvalho Muniz wrote: I found in the commit history of Libxml2 (commit 9acef28) the presence of the following code snippet in the libxml.c file (Lines 1,597 - 1,612). More specifically python/libxml.c which is part of the Python bindings. I believe that this

Re: [xml] error compiling libxml2-2.9.9 with MinGW with MSYS

2019-05-12 Thread Nick Wellnhofer
On 12/05/2019 19:15, Test User via xml wrote: ../libxml2-2.9.9/nanohttp.c:915:28: error: 'F_GETFL' undeclared (first use in this function) if ((status = fcntl(s, F_GETFL, 0)) != -1) { ^~~ Should be fixed with this commit from January:

Re: [xml] Potential NULL pointer dereference in xmlregexp.c

2019-03-05 Thread Nick Wellnhofer
On 04/03/2019 20:37, Shaobo He via xml wrote: I'm Shaobo He, a graduate student at University of Utah. I'm running a static analysis tool on libxml2 and noticed there may be a NULL pointer dereference in function `xmlRegexpIsDeterminist`. Basically, function `xmlNewAutomata` can return a NULL

Re: [xml] [PATCH] always define LIBXML_THREAD_ENABLED when enabled

2019-02-28 Thread Nick Wellnhofer
On 27/02/2019 15:43, Michael Haubenwallner wrote: this is the followup patch proposal to https://mail.gnome.org/archives/xml/2018-September/msg2.html Thanks, applied here: https://gitlab.gnome.org/GNOME/libxml2/commit/cf68fe3d505dd3f7525ccc28c90f87432a747aa4 Nick

Re: [xml] Release of libxml2-2.9.9

2019-01-30 Thread Nick Wellnhofer
On 30/01/2019 10:36, Alexander Dahl wrote: What about CVE-2017-8872? Debian (and SuSE) have a patch: https://sources.debian.org/patches/libxml2/2.9.8+dfsg-1/0003-CVE-2017-8872.patch/ https://security-tracker.debian.org/tracker/CVE-2017-8872 According to

Re: [xml] HTML parser sometimes doesn't close script tags in libxml2 2.9.8

2019-01-23 Thread Nick Wellnhofer
On 23/01/2019 16:14, Tomi Belan wrote: I don't know too much about Python's C API, but [2] [3] suggests lxml is using a deprecated macro and giving libxml2 a multibyte buffer even though the input would fit into pure ASCII. This explains why it behaved differently than xmllint. Right, if

Re: [xml] HTML parser sometimes doesn't close script tags in libxml2 2.9.8

2019-01-23 Thread Nick Wellnhofer
On 23/01/2019 01:47, Tomi Belan wrote: But even so I still wasn't able to reproduce it in pure C. Could it be because xmllint reads ctxt->myDoc, and lxml uses SAX2 event handlers (according to parsertarget.pxi)? AFAICT xmllint's --push and --sax options are incompatible. ctxt->myDoc is also

Re: [xml] HTML parser sometimes doesn't close script tags in libxml2 2.9.8

2019-01-22 Thread Nick Wellnhofer
On 22/01/2019 19:11, Tomi Belan wrote: I tried to reproduce it with only xmllint as you suggest, but I'm not having much luck. It produces correct results with "--html --debug bad.html", "--html --debug --stream bad.html", "--html --debug --push bad.html", and "--html --debug --sax bad.html".

Re: [xml] HTML parser sometimes doesn't close script tags in libxml2 2.9.8

2019-01-22 Thread Nick Wellnhofer
On 22/01/2019 15:43, Tomi Belan via xml wrote: After a lot of debugging, I determined the problem is in libxml2 and not the other libraries in my stack, and that it only seems to happen on version 2.9.8. But I don't see any related changes in news.html for 2.9.9, nor in the diff between them,

Re: [xml] Entering freeze for release of libxml2-2.9.9

2018-12-19 Thread Nick Wellnhofer
On 30/11/2018 11:41, Nikolai Weibull via xml wrote: OK, now I understand why it was working in my copy of the repository and not yours.  Something went wrong when you applied the patch, Daniel, as a line was elided.  Here’s a fix.  We want to include XML_RELAXNG_TEXT here as well, otherwise it

Re: [xml] Entering freeze for release of libxml2-2.9.9

2018-12-01 Thread Nick Wellnhofer
On 29/11/2018 22:50, Daniel Veillard wrote: On Fri, Nov 23, 2018 at 11:12:13PM +0100, Nick Wellnhofer wrote: The function now claims to work without preparsed documents, so the workaround isn't used. But apparently there's problem with the commit. I'm CC'ing the author. If we can't get

Re: [xml] Entering freeze for release of libxml2-2.9.9

2018-11-24 Thread Nick Wellnhofer
On 24/11/2018 14:01, Daniel Veillard via xml wrote: Nick there seems to be 7 merge requests, maybe we need to go though those before I push an RC2, https://gitlab.gnome.org/GNOME/libxml2/merge_requests/5 This should be kept externally, IMO.

Re: [xml] Entering freeze for release of libxml2-2.9.9

2018-11-23 Thread Nick Wellnhofer
On 23/11/2018 22:38, Nick Wellnhofer wrote: On 23/11/2018 20:51, Shlomi Fish wrote: I am getting a failure in one of the tests of https://github.com/shlomif/perl-XML-LibXML - it works fine with 2.9.8: Can you check if it's caused by one of the following commits? Nevermind, it's this commit

Re: [xml] Entering freeze for release of libxml2-2.9.9

2018-11-23 Thread Nick Wellnhofer
On 23/11/2018 20:51, Shlomi Fish wrote: I am getting a failure in one of the tests of https://github.com/shlomif/perl-XML-LibXML - it works fine with 2.9.8: Can you check if it's caused by one of the following commits?

Re: [xml] Entering freeze for release of libxml2-2.9.9

2018-11-23 Thread Nick Wellnhofer
On 22/11/2018 18:32, Daniel Veillard via xml wrote: Please give it some testing, if we need to make changes I will likely push an RC2 mid next week, and if everything goes well I will push 2.9.9 final end of next week. Built and tested (with `make check`) succesfully on: - Windows 10 -

Re: [xml] xmlIO.obj : error LNK2019: unresolved external symbol

2018-11-03 Thread Nick Wellnhofer
On 03/11/2018 01:02, Heng Zhou via xml wrote: xmlIO.obj : error LNK2019: unresolved external symbol __libxml2_xzopen referenced in function xmlXzfileOpen_real Can you try the attached patch? Untested, but if lzma is enabled, we have to compile and link xzlib.c as well. Nick diff --git

Re: [xml] Serialization of documents without encoding

2018-09-27 Thread Nick Wellnhofer
On 25/09/2018 14:36, Nick Wellnhofer wrote: The whole situation is a mess. I'd love to change the code so that non-ASCII chars are always encoded as UTF-8, but I'm scared to break things. This is the change I have in mind: https://github.com/nwellnhof/libxml2/commit

Re: [xml] Serialization of documents without encoding

2018-09-27 Thread Nick Wellnhofer
On 27/09/2018 10:59, Roumen Petrov wrote: Let consider case as "file" mode. Let consider case as "stream" code. I'm not only talking about xmllint but the serialization API (xmlSave*, xmlNodeDump*) in general. Now about above test samples . if content is stored in file xmllint works fine

Re: [xml] Serialization of documents without encoding

2018-09-25 Thread Nick Wellnhofer
On 25/09/2018 13:19, Nick Wellnhofer wrote: libxml2 serializes documents without an encoding declaration differently than documents with an explicit UTF-8 encoding: It seems that this was partially changed in 2005 with the following commit: https://gitlab.gnome.org/GNOME/libxml2/commit

[xml] Serialization of documents without encoding

2018-09-25 Thread Nick Wellnhofer
libxml2 serializes documents without an encoding declaration differently than documents with an explicit UTF-8 encoding: $ echo 'Käse' |xmllint - Kse $ echo 'Käse' |xmllint - Käse Since the encoding should default to UTF-8, can anyone explain why this decision was made? Nick

Re: [xml] Is there a solution to have newline delimited output for xmllint ?

2018-09-23 Thread Nick Wellnhofer
On 23/09/2018 15:12, gilles.que...@sputnick.fr wrote: This is the official libxml repository I guess(?). Yes. Do you know if a Debian package will be packaged ? I will contact Archlinux mainteners to update package, last update 2016. All distros will eventually catch up but it probably

Re: [xml] Is there a solution to have newline delimited output for xmllint ?

2018-09-23 Thread Nick Wellnhofer
On 20/03/2018 16:45, Nick Wellnhofer wrote: I agree that printing text nodes without a separator is rather useless and I always found it annoying that the output isn't terminated with a newline at all. In this case, I'm not too concerned about backward compatibility and I'd simply change

Re: [xml] [PATCH] variables need 'extern' in static lib on Cygwin

2018-09-22 Thread Nick Wellnhofer
On 17/09/2018 10:59, Michael Haubenwallner wrote: While the dllimport/dllexport macros now work for Cygwin, using the static library still requires variables to be declared as 'extern'. This is a regression of c65c9e8ee07e2dab0647392c2bd1795a5bc99829, found+fixed by Bruno Haible using static

Re: [xml] possibility to use xpath searching on xml balanced chunks

2018-09-05 Thread Nick Wellnhofer
On 05/09/2018 10:53, Pavel Stehule via xml wrote: Is any possibility to read balanced chunk in format where XPatch searching is possible? By design, XPath only works on full documents. All you can do is to insert the balanced chunk under a dummy document node. Nick

Re: [xml] [PATCH] always dllexport the singlethreaded variables

2018-09-04 Thread Nick Wellnhofer
On 04/09/2018 11:00, Michael Haubenwallner wrote: Right now, LIBXML_THREAD_ENABLED is defined in xmlversion.h only if the *application* does enable threads OK, I thought that LIBXML_THREAD_ENABLED only depends on the configure switch, but it also depends on the following check in

Re: [xml] [PATCH] always dllexport the singlethreaded variables

2018-08-31 Thread Nick Wellnhofer
On 25/05/2018 17:46, Michael Haubenwallner wrote: When an application using libxml2 does not enable multithreaded support for itself, we provide the singlethreaded variables, eventually tagged with dllimport. So even when we build the multithreaded libxml2, our singlethreaded variables still

Re: [xml] [PATCH] really declare dllexport/dllimport for Cygwin

2018-08-31 Thread Nick Wellnhofer
Thanks, patch applied here: https://gitlab.gnome.org/GNOME/libxml2/commit/c65c9e8ee07e2dab0647392c2bd1795a5bc99829 On 25/05/2018 17:46, Michael Haubenwallner wrote: Cygwin does not define _WIN32, but still requires dllexport/dllimport tags for when applications use the --disable-auto-import

Re: [xml] performance of parsing docbook with xincludes

2018-06-08 Thread Nick Wellnhofer
On 08/06/2018 03:45, Eric S. Eberhard wrote: Some very simple things to do:  1) put the DTD hosts into the /etc/hosts file (or another if you like and substitute an IP)   2)  set /etc/resolv.conf to first look in the hosts file (before DNS) The discussion is not about caching DTDs loaded over

Re: [xml] performance of parsing docbook with xincludes

2018-06-07 Thread Nick Wellnhofer
On 07/06/2018 00:00, Stefan Sauer wrote: Another idea is to stop loading external DTDs for XIncludes without an XPointer expression. This would still change the behavior for some users but it's much less likely to cause problems. change the behaviour, as in we would not catch validation errors?

Re: [xml] performance of parsing docbook with xincludes

2018-05-17 Thread Nick Wellnhofer
On 16/05/2018 21:51, Stefan Sauer wrote: So one solution could be another flag to enable this? Yes, but it would be rather ugly. Thanks, reading the code. Need to figure where we could cache external subsets and what a suitable keys is (ExternalID ?). Note that I'm currently not planning

Re: [xml] performance of parsing docbook with xincludes

2018-05-15 Thread Nick Wellnhofer
On May 15, 2018, at 21:56 , Stefan Sauer <enso...@hora-obscura.de> wrote: > > On 05/15/2018 08:40 PM, Stefan Sauer wrote: >> On 05/15/2018 12:42 PM, Nick Wellnhofer wrote: >>> Can you try to change the line to >>> >>> xmlCtxtUseOptions(pctxt, ct

Re: [xml] performance of parsing docbook with xincludes

2018-05-15 Thread Nick Wellnhofer
On 14/05/2018 21:48, Stefan Sauer wrote: This part looks suspicious: |--22.98%--0xc2160 | xmlFreeDoc | | | --22.42%--xmlFreeDtd Can I tell it to not load dtds in the first place? Is it loading the dtd

Re: [xml] performance of parsing docbook with xincludes

2018-05-14 Thread Nick Wellnhofer
On 13/05/2018 20:54, Stefan Sauer wrote: Lets look at some numbers using glib (https://gitlab.gnome.org/GNOME/glib) cd glib/docs/reference/glib xmllint --timing --xinclude --noout glib-docs.xml Parsing took 0 ms Xinclude processing took 4560 ms Freeing took 91 ms Any idea how I can get more

Re: [xml] Is there a solution to have newline delimited output for xmllint ?

2018-03-20 Thread Nick Wellnhofer
On 20/03/2018 14:14, gilles.que...@sputnick.fr wrote: I post many snippets with xmllint on stackoverflow and unix.stackexchange.com, but many times I'm stuck with this nice tool when it comes to retrieve N > 1 text node, because the output is not newline delimited (unlike xmlstarlet). It's

Re: [xml] libxml2 2.9.8 build error on AIX, HP-UX and old Visual Studio like 10.0

2018-03-15 Thread Nick Wellnhofer
On 15/03/2018 17:29, Fabrice Manfroi wrote: The patch works for AIX/HP but with the old Visual Studio 2010 I have another error: {quote} ..\xpath.c(501) : error C2124: divide or mod by zero {quote} Can you try this updated version of the patch (against master, not on top of the previous

Re: [xml] libxml2 2.9.8 build error on AIX, HP-UX and old Visual Studio like 10.0

2018-03-15 Thread Nick Wellnhofer
On 15/03/2018 15:50, Fabrice Manfroi wrote: ..\xpath.c(506) : error C2099: initializer is not a constant Does the attached patch work for you? Nick diff --git a/xpath.c b/xpath.c index f4406967..773e848b 100644 --- a/xpath.c +++ b/xpath.c @@ -485,9 +485,9 @@ int wrap_cmp( xmlNodePtr x,

Re: [xml] Time for some releases

2018-01-22 Thread Nick Wellnhofer
On 21/01/2018 07:22, Daniel Veillard wrote: I think it's time for a new set of releases, I failed to push in the last 2 months and a number of patches have accumulated since november, so I think entering freeze on Mon or Tuesday, then having rc2 around end of week for a release early around

Re: [xml] Heap use after free in parser.c

2018-01-22 Thread Nick Wellnhofer
On 08/01/2018 22:43, Jay Civelli wrote: On Mon, Jan 8, 2018 at 11:27 AM, Nick Wellnhofer <wellnho...@aevum.de <mailto:wellnho...@aevum.de>> wrote: On 02/01/2018 20:08, Jay Civelli via xml wrote: We ran into a heap use after free in Chromium http://crbug.com/793715

Re: [xml] [PATCH] Check hex or decimal entity for overflow

2018-01-22 Thread Nick Wellnhofer
On 09/01/2018 00:55, Joel Hockey wrote: Updated patch with XML_ERR_INVALID_CHAR. Should be fixed with https://git.gnome.org/browse/libxml2/commit/?id=60dded12cbf1705927803c5ed615a7a0132aebbd As noted previously, this only affects "recovery" mode. The commit addresses the issue at an

Re: [xml] Fwd: Patch to fix ICU flush and pivot buffer

2018-01-08 Thread Nick Wellnhofer
On 08/01/2018 02:06, Joel Hockey wrote: Nick, I have another patch for some additional call sites where flush is being incorrectly set on the non-final read. Applied here: https://git.gnome.org/browse/libxml2/commit/?id=6e6ae5daa6cd9640c9a83c1070896273e9b30d14 Looks right, but I applied the

Re: [xml] Heap use after free in parser.c

2018-01-08 Thread Nick Wellnhofer
On 02/01/2018 20:08, Jay Civelli via xml wrote: We ran into a heap use after free in Chromium http://crbug.com/793715 that I think I tracked down. I don't have access to this page. I have a tentative patch attached to address it. In parser.c, if a call to

Re: [xml] [PATCH] Check hex or decimal entity for overflow

2018-01-08 Thread Nick Wellnhofer
On 08/01/2018 02:06, Joel Hockey wrote: The entity parsing code in tree.c is getting integer overflow when a very long, invalid hex (or decimal) entity is used:  e.g. #xabcdefabcdef; This is probably the same issue as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3874 Also see

Re: [xml] Simplify XPath NaN, inf and -0 handling

2017-12-09 Thread Nick Wellnhofer
On 08/12/2017 10:26, Daniel Veillard wrote: what do you really gain by this ? Things which were known portable cross many platforms now become unclear again. Trio might be deprecated, I would ask Daniel Stenberg first, so in copy, Most of all, I want to get rid of the Trio dependency. I'm

Re: [xml] Patch suggestion for "fixing" 10 MB limit when using xmlNewTextWriterDoc

2017-12-04 Thread Nick Wellnhofer
On 29/11/2017 22:14, Stian Hvatum wrote: I am one of those who have been bit by the 10 MB limit when building an XML using xmlNewTextWriterDoc as constructor the xmlTextWriter. I already mentioned on this list that, personally, I'd completely remove the text node size limit. It ostensibly

[xml] Update information about contributing

2017-11-14 Thread Nick Wellnhofer
Here's a patch that I'd like to discuss before committing. Nick -- https://github.com/nwellnhof/libxml2/commit/cbedb8de41ba260d8cf5a4b9858f43175d01715e Update information about contributing The contents of the HACKING file were hopelessly outdated. Remove the file and start

[xml] Simplify XPath NaN, inf and -0 handling

2017-11-14 Thread Nick Wellnhofer
Here's are patch that I'd like to discuss before committing. Nick -- https://github.com/nwellnhof/libxml2/commit/8813f397f8925f85ffbe9e9fb62bfaa3c1accf11 Simplify XPath NaN, inf and -0 handling Use C99 macros NAN, INFINITY, isnan, isinf. If they're not available: - Assume

  1   2   >