Cocoon
  1. Cocoon
  2. COCOON-2158

XMLByteStreamCompiler hard-coded limits of 0xffff Strings prevents large XML documents from being handled in Cocoon

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1.6, 2.1.7, 2.1.8, 2.1.9, 2.1.10, 2.1.11, 2.1.12
    • Fix Version/s: 2.1.12, 2.2
    • Component/s: * Cocoon Core
    • Labels:
      None
    • Urgency:
      Urgent
    • Other Info:
      Patch available
    • Affects version (Component):
      Cocoon Core
    • Fix version (Component):
      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.

        Activity

          People

          • Assignee:
            Antonio Gallardo
            Reporter:
            Eric Meyer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development