From f4ea85c11b4660b29ea52f22e2ca133cb32859a5 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Wed, 29 Feb 2012 21:01:58 +0100 Subject: [PATCH] corrected copying of buffers. --- lib/gnutls_mbuffers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gnutls_mbuffers.c b/lib/gnutls_mbuffers.c index 24888655f..496c1cc35 100644 --- a/lib/gnutls_mbuffers.c +++ b/lib/gnutls_mbuffers.c @@ -356,8 +356,8 @@ _mbuffer_linearize (mbuffer_head_st * buf) for (cur = _mbuffer_head_get_first (buf, &msg); msg.data != NULL; cur = _mbuffer_head_get_next (cur, &msg)) { - memcpy (&bufel->msg.data[pos], msg.data, cur->msg.size); - pos += cur->msg.size; + memcpy (&bufel->msg.data[pos], msg.data, msg.size); + pos += msg.size; } _mbuffer_head_clear (buf); -- 2.11.4.GIT