diff --git a/ChangeLog b/ChangeLog index 898c5acc..871911a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Wed Jul 6 13:40:22 CEST 2005 Kasimier Buchcik + + * xmlschemastypes.c: Fixed bug #309338, reported by Kupriyanov + Anotolij. + * test/schemas/bug309338* result/schemas/bug309338*: + Added a regression test for the above bug. + Tue Jul 5 16:03:05 CEST 2005 Daniel Veillard * Makefile.am: first steps toward a testsuite dist diff --git a/result/schemas/bug309338_1_0 b/result/schemas/bug309338_1_0 new file mode 100644 index 00000000..65331f14 --- /dev/null +++ b/result/schemas/bug309338_1_0 @@ -0,0 +1 @@ +./test/schemas/bug309338_0.xml validates diff --git a/result/schemas/bug309338_1_0.err b/result/schemas/bug309338_1_0.err new file mode 100644 index 00000000..e69de29b diff --git a/test/schemas/bug309338_0.xml b/test/schemas/bug309338_0.xml new file mode 100644 index 00000000..33cbf95e --- /dev/null +++ b/test/schemas/bug309338_0.xml @@ -0,0 +1,4 @@ + +2000.00 diff --git a/test/schemas/bug309338_1.xsd b/test/schemas/bug309338_1.xsd new file mode 100644 index 00000000..0aa586c9 --- /dev/null +++ b/test/schemas/bug309338_1.xsd @@ -0,0 +1,13 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/xmlschemastypes.c b/xmlschemastypes.c index d9fee06e..27f7b536 100644 --- a/xmlschemastypes.c +++ b/xmlschemastypes.c @@ -2194,7 +2194,8 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar * value, * If a mixed decimal, get rid of trailing zeroes */ if (dec != -1) { - while ((cptr > cval) && (*(cptr-1) == '0')) { + while ((len > dec) && (cptr > cval) && + (*(cptr-1) == '0')) { cptr--; len--; }