]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
corrected copying of buffers.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 29 Feb 2012 20:01:58 +0000 (21:01 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Wed, 29 Feb 2012 20:01:58 +0000 (21:01 +0100)
lib/gnutls_mbuffers.c

index 24888655f241ae0364e80f80eec5fb216e26783d..496c1cc35c0ad3e63753200a1fe7d2ae79413982 100644 (file)
@@ -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);