[Bug 51358] Civilization 4: XML load error when trying to start
WineHQ Bugzilla
wine-bugs at winehq.org
Thu Aug 5 01:58:32 CDT 2021
https://bugs.winehq.org/show_bug.cgi?id=51358
Damjan Jovanovic <damjan.jov at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch, testcase
Component|-unknown |msxml3
--- Comment #6 from Damjan Jovanovic <damjan.jov at gmail.com> ---
$ touch /tmp/z.xml
----------------
libxml2 2.9.10:
----------------
$ xmllint --schema datatypes.xsd /tmp/z.xml
/tmp/z.xml:1: parser error : Document is empty
^
----------------
libxml2 2.9.12:
----------------
$ xmllint --schema datatypes.xsd /tmp/z.xml
regexp error : failed to compile: Improper quantifier
regexp error : failed to compile: xmlFAParseRegExp: extra characters
datatypes.xsd:203: element pattern: Schemas parser error : Element
'{http://www.w3.org/2001/XMLSchema}pattern': The value
'([0-9]{,14})([.][0-9]{,4})?' of the facet 'pattern' is not a valid regular
expression.
regexp error : failed to compile: Improper quantifier
regexp error : failed to compile: xmlFAParseAtom: expecting ')'
regexp error : failed to compile: xmlFAParseRegExp: extra characters
datatypes.xsd:542: element pattern: Schemas parser error : Element
'{http://www.w3.org/2001/XMLSchema}pattern': The value
'([0-9A-Fa-f]{4})([-]{,1}[0-9A-Fa-f]{4})*' of the facet 'pattern' is not a
valid regular expression.
WXS schema datatypes.xsd failed to compile
/tmp/z.xml:1: parser error : Document is empty
^
I think it's this libxml2 commit that made the quantifier check stricter,
disallowing "S{,m}":
---snip---
commit f8329fdc234a43b858271acc75ea70881e35fcae
Author: Nick Wellnhofer <wellnhofer at aevum.de>
Date: Thu Jul 2 11:51:31 2020 +0200
Report error for invalid regexp quantifiers
diff --git a/xmlregexp.c b/xmlregexp.c
index 0272dcab..687290e2 100644
--- a/xmlregexp.c
+++ b/xmlregexp.c
@@ -5268,6 +5268,9 @@ xmlFAParseQuantifier(xmlRegParserCtxtPtr ctxt) {
cur = xmlFAParseQuantExact(ctxt);
if (cur >= 0)
min = cur;
+ else {
+ ERROR("Improper quantifier");
+ }
if (CUR == ',') {
NEXT;
if (CUR == '}')
---snip---
The first release of libxml2 it appeared in is 2.9.11.
S{,m} quantifiers do not work in Java, .NET, or even MSXML on Windows itself.
Therefore my patch is correct. Submitted:
https://source.winehq.org/patches/data/210930
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list