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.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/rpc/virnetmessage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/rpc/virnetmessage.c b/src/rpc/virnetmessage.c
index ceba1a5a8e..438c75b049 100644
--- a/src/rpc/virnetmessage.c
+++ b/src/rpc/virnetmessage.c
@@ -423,7 +423,7 @@ int virNetMessageDecodePayload(virNetMessage *msg,
}
/* Get the length stored in buffer. */
- msg->bufferLength += xdr_getpos(&xdr);
+ msg->bufferOffset += xdr_getpos(&xdr);
xdr_destroy(&xdr);
return 0;
--
2.38.1