From e6a972f97554a32bf06124d4bb97038f050cbf68 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 1 Feb 2016 12:58:42 +0100 Subject: [PATCH] Fix incorrect memcpy() with overlapping buffers refs #11014 --- lib/base/fifo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/base/fifo.cpp b/lib/base/fifo.cpp index abe2c4dfd..7add8bf68 100644 --- a/lib/base/fifo.cpp +++ b/lib/base/fifo.cpp @@ -68,7 +68,7 @@ void FIFO::ResizeBuffer(size_t newSize, bool decrease) void FIFO::Optimize(void) { if (m_Offset - m_DataSize > 1024) { - std::memcpy(m_Buffer, m_Buffer + m_Offset, m_DataSize); + std::memmove(m_Buffer, m_Buffer + m_Offset, m_DataSize); m_Offset = 0; if (m_DataSize > 0) -- 2.40.0