From 07ae82f17ad19bdc289013bc4bcd0528a87ed571 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Wed, 3 Dec 2014 20:09:46 +0100 Subject: [PATCH] Fixed buffer pointer offset when copying data. --- src/vmime/net/smtp/SMTPChunkingOutputStreamAdapter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vmime/net/smtp/SMTPChunkingOutputStreamAdapter.cpp b/src/vmime/net/smtp/SMTPChunkingOutputStreamAdapter.cpp index 15e24cf1..f6ecc54d 100644 --- a/src/vmime/net/smtp/SMTPChunkingOutputStreamAdapter.cpp +++ b/src/vmime/net/smtp/SMTPChunkingOutputStreamAdapter.cpp @@ -123,7 +123,7 @@ void SMTPChunkingOutputStreamAdapter::writeImpl const size_t remaining = sizeof(m_buffer) - m_bufferSize; const size_t bytesToCopy = std::min(remaining, curCount); - std::copy(data, data + bytesToCopy, m_buffer + m_bufferSize); + std::copy(curData, curData + bytesToCopy, m_buffer + m_bufferSize); m_bufferSize += bytesToCopy; curData += bytesToCopy;