mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 01:43:23 +00:00
rpc: fix buffer offset updates after decoding payload
The buffer length refers to the allocated buffer memory size, while the offset refers to have much of the buffer we have read/written. After reading the message payload we must thus update the latter. Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
77b9617cd7
commit
8868cb2f7c
@ -423,7 +423,7 @@ int virNetMessageDecodePayload(virNetMessage *msg,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Get the length stored in buffer. */
|
/* Get the length stored in buffer. */
|
||||||
msg->bufferLength += xdr_getpos(&xdr);
|
msg->bufferOffset += xdr_getpos(&xdr);
|
||||||
xdr_destroy(&xdr);
|
xdr_destroy(&xdr);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user