]> xenbits.xensource.com Git - libvirt.git/commit
rpc: Correct the wrong payload size checking
authorOsier Yang <jyang@redhat.com>
Mon, 14 Oct 2013 07:09:31 +0000 (15:09 +0800)
committerOsier Yang <jyang@redhat.com>
Wed, 16 Oct 2013 12:36:46 +0000 (20:36 +0800)
commit0959785d3b4a4da3c24352942ca4d2152f4e0191
tree21f6c5eeeef4376a4c24308809a3e80c73306df3
parent8757d0abbc190e4873ed5e475e6dcfa7939ed4ba
rpc: Correct the wrong payload size checking

<...>
/* Size of message length field. Not counted in VIR_NET_MESSAGE_MAX
 * and VIR_NET_MESSAGE_INITIAL.
 */
const VIR_NET_MESSAGE_LEN_MAX = 4;
</...>

However, msg->bufferLength includes the length word. The wrong checking
was introduced by commit e914dcfd.

* src/rpc/virnetmessage.c:
  - Correct the checking in virNetMessageEncodePayloadRaw
  - Use a new variable to track the new payload length in
    virNetMessageEncodePayloadRaw
src/rpc/virnetmessage.c