Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-1465

CommandAwareRpcDispatcher message handling doesn't handle buffer offset correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 5.1.0.BETA3
    • 5.1.0.BETA1
    • Core
    • None

      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(...).

              pferraro@redhat.com Paul Ferraro
              pferraro@redhat.com Paul Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: