GNOME Bugzilla – Bug 351032
heap corruption in xmlschemas.c: xmlSchemaXPathEvaluate
Last modified: 2006-08-15 12:29:28 UTC
Steps to reproduce: Create a schema with a unique check, using ".//*" as a selector xpath on a more than 5 level deep xml tree. Stack trace: *** glibc detected *** free(): invalid next size (fast): 0x08640848 *** Aborted (core dumped) (gdb) bt
+ Trace 70298
Other information: --- /tmp/libxml2-2.6.24.dfsg/xmlschemas.c 2006-04-21 19:28:02.000000000 +0200 +++ xmlschemas.c 2006-08-11 13:57:16.000000000 +0200 @@ -22156,7 +22156,7 @@ "allocating the state object history", NULL); return(-1); } - sto->sizeHistory = 10; + sto->sizeHistory = 5; } else if (sto->sizeHistory <= sto->nbHistory) { sto->sizeHistory *= 2; sto->history = (int *) xmlRealloc(sto->history,
Okay, this looks like a stupid mistake and the patch seems correct, so I applied it in CVS. Could you please provide a full exammple (XML/XSD) reproducing this to add to teh test suite. thanks ! Daniel
*** Bug 350247 has been marked as a duplicate of this bug. ***