Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
2.1.6, 2.1.7, 2.1.8, 2.1.9, 2.1.10, 2.1.11, 2.1.12
-
None
-
Urgent
-
Patch available
-
Cocoon Core
-
Cocoon Core
Description
The hard-coded limits in XMLByteStreamCompiler prevent Cocoon from handling large XML documents.
See the methods writeString and writeAttributes for the hard coded arbitrary maximums:
if (i > 0xFFFF) throw new SAXException("Index too large");
if (attributes > 0xFFFF) throw new SAXException("Too many attributes");
Additionally, the hand-coded bit manipulation is pretty difficult to change in order to work around this.
I am attaching a patch for 2.1.11 that updates the existing JUnit test case to reproduce the problem, as well as a fix to the problem that uses the DataInputStream and DataOutputStream for the low-level bit manipulation.
See the methods writeString and writeAttributes for the hard coded arbitrary maximums:
if (i > 0xFFFF) throw new SAXException("Index too large");
if (attributes > 0xFFFF) throw new SAXException("Too many attributes");
Additionally, the hand-coded bit manipulation is pretty difficult to change in order to work around this.
I am attaching a patch for 2.1.11 that updates the existing JUnit test case to reproduce the problem, as well as a fix to the problem that uses the DataInputStream and DataOutputStream for the low-level bit manipulation.