[infinispan-issues] [JBoss JIRA] (ISPN-1465) CommandAwareRpcDispatcher message handling doesn't handle buffer offset correctly

Sanne Grinovero (Commented) (JIRA) jira-events at lists.jboss.org
Wed Oct 19 13:12:48 EDT 2011


    [ https://issues.jboss.org/browse/ISPN-1465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12635846#comment-12635846 ] 

Sanne Grinovero commented on ISPN-1465:
---------------------------------------

sorry for "stealing" the pull request Galder; I didn't know it was meant to you, but I already checked it and merged. Paul if you create a pull request to be managed by a specific person, please add a comment in the pull or we might jump on it ;-) Anyway it looked like it made a lot of sense; actually I have less failures than usual (luck? will check).
                
> CommandAwareRpcDispatcher message handling doesn't handle buffer offset correctly
> ---------------------------------------------------------------------------------
>
>                 Key: ISPN-1465
>                 URL: https://issues.jboss.org/browse/ISPN-1465
>             Project: Infinispan
>          Issue Type: Bug
>          Components: RPC
>    Affects Versions: 5.1.0.BETA1
>            Reporter: Paul Ferraro
>            Assignee: Paul Ferraro
>            Priority: Minor
>             Fix For: 5.1.0.BETA3
>
>
> Looking at the CommandAwareRpcDispatcher.handle(Message) (line 139):
>   cmd = (ReplicableCommand) req_marshaller.objectFromBuffer(req.getBuffer(), req.getOffset(), req.getLength());
> Message.getBuffer() already returns a copy of the message buffer that takes into account the offset and length.  So, it would seem the above code will return a subset of the desired buffer if the offset > 0.
> Either this code should operate on the raw buffer (i.e. req.getRawBuffer()), or pass 0 as the offset to objectFromBuffer(...).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the infinispan-issues mailing list