You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Trustin Lee (JIRA)" <ji...@apache.org> on 2008/07/30 13:53:32 UTC

[jira] Created: (DIRMINA-613) Calling IoBuffer.slice() in CumulativeProtocolDecoder.doDecode() can cause data corruption.

Calling IoBuffer.slice() in CumulativeProtocolDecoder.doDecode() can cause data corruption. 
--------------------------------------------------------------------------------------------

                 Key: DIRMINA-613
                 URL: https://issues.apache.org/jira/browse/DIRMINA-613
             Project: MINA
          Issue Type: Bug
          Components: Filter
    Affects Versions: 2.0.0-M2, 2.0.0-M1
            Reporter: Trustin Lee
            Assignee: Trustin Lee
             Fix For: 2.0.0-M3


According to the attached test case, it seems like it is easy to cause data corruption if a user calls IoBuffer.slice() inside CumulativeProtocolDecoder.doDecode() implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DIRMINA-613) Calling IoBuffer.slice() in CumulativeProtocolDecoder.doDecode() can cause data corruption.

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRMINA-613?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Trustin Lee updated DIRMINA-613:
--------------------------------

    Attachment: MinaCPProblemTest.java

The test case which reproduces the problem.  The test case is against MINA 2.0.0-M1, but it should compile once import statements are fixed.

The test doesn't fail at all because it just prints out 1000 lines of progress.  If it doesn't reach to 999, then it's failure.

> Calling IoBuffer.slice() in CumulativeProtocolDecoder.doDecode() can cause data corruption. 
> --------------------------------------------------------------------------------------------
>
>                 Key: DIRMINA-613
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-613
>             Project: MINA
>          Issue Type: Bug
>          Components: Filter
>    Affects Versions: 2.0.0-M1, 2.0.0-M2
>            Reporter: Trustin Lee
>            Assignee: Trustin Lee
>             Fix For: 2.0.0-M3
>
>         Attachments: MinaCPProblemTest.java
>
>
> According to the attached test case, it seems like it is easy to cause data corruption if a user calls IoBuffer.slice() inside CumulativeProtocolDecoder.doDecode() implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DIRMINA-613) Calling IoBuffer.slice() in CumulativeProtocolDecoder.doDecode() can cause data corruption.

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DIRMINA-613?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Trustin Lee closed DIRMINA-613.
-------------------------------

    Resolution: Fixed

Confirmed that the test case passes with the fix, and all existing test cases pass.

> Calling IoBuffer.slice() in CumulativeProtocolDecoder.doDecode() can cause data corruption. 
> --------------------------------------------------------------------------------------------
>
>                 Key: DIRMINA-613
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-613
>             Project: MINA
>          Issue Type: Bug
>          Components: Filter
>    Affects Versions: 2.0.0-M1, 2.0.0-M2
>            Reporter: Trustin Lee
>            Assignee: Trustin Lee
>             Fix For: 2.0.0-M3
>
>         Attachments: MinaCPProblemTest.java
>
>
> According to the attached test case, it seems like it is easy to cause data corruption if a user calls IoBuffer.slice() inside CumulativeProtocolDecoder.doDecode() implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DIRMINA-613) Calling IoBuffer.slice() in CumulativeProtocolDecoder.doDecode() can cause data corruption.

Posted by "Trustin Lee (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DIRMINA-613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12618305#action_12618305 ] 

Trustin Lee commented on DIRMINA-613:
-------------------------------------

The fix for this issue is very straightforward.  We need to avoid calling IoBuffer.compact() when a slice() has been called.

> Calling IoBuffer.slice() in CumulativeProtocolDecoder.doDecode() can cause data corruption. 
> --------------------------------------------------------------------------------------------
>
>                 Key: DIRMINA-613
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-613
>             Project: MINA
>          Issue Type: Bug
>          Components: Filter
>    Affects Versions: 2.0.0-M1, 2.0.0-M2
>            Reporter: Trustin Lee
>            Assignee: Trustin Lee
>             Fix For: 2.0.0-M3
>
>         Attachments: MinaCPProblemTest.java
>
>
> According to the attached test case, it seems like it is easy to cause data corruption if a user calls IoBuffer.slice() inside CumulativeProtocolDecoder.doDecode() implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.