santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 41573] New: - XMLCipher StackOverflowError
Date Thu, 08 Feb 2007 19:48:38 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41573>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41573

           Summary: XMLCipher StackOverflowError
           Product: Security
           Version: unspecified
          Platform: PC
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Encryption
        AssignedTo: security-dev@xml.apache.org
        ReportedBy: mjablon@wp.pl


When encrypt xml documents large then 5MB 
using org.apache.xml.security.encryption.XMLCipher 

Exception in thread "main" java.lang.StackOverflowError
>         at org.apache.xerces.dom.ParentNode.internalRemoveChild(Unknown Source)
>         at org.apache.xerces.dom.ParentNode.removeChild(Unknown Source)
>         at org.apache.xml.security.encryption.XMLCipher.removeContent(Unknown So
> urce)
>         at org.apache.xml.security.encryption.XMLCipher.removeContent(Unknown So

then bag is in implementation : (recursive invocation)

    private void removeContent(Node node) {
        NodeList list = node.getChildNodes();
        if (list.getLength() > 0) {
            Node n = list.item(0);
            if (null != n) {
                n.getParentNode().removeChild(n);
            }
            removeContent(node);
        }
    }


I'm sugesting change it, for example:

    private void removeContent(Node node) {
        NodeList list = node.getChildNodes();
        while(list.getLength() > 0) {
            Node n = list.item(0);
            if (null != n) {
                n.getParentNode().removeChild(n);
            }
        }
    }

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Mime
View raw message