From cdb2195ed33d0641ede5c82c72091425278336c1 Mon Sep 17 00:00:00 2001 From: Guenter Obiltschnig Date: Fri, 7 Oct 2016 21:27:07 +0200 Subject: [PATCH] fixed GH #1431: Poco/FIFOBuffer.h copy issue --- Foundation/include/Poco/FIFOBuffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Foundation/include/Poco/FIFOBuffer.h b/Foundation/include/Poco/FIFOBuffer.h index 669a7dcbf..50ef408a7 100644 --- a/Foundation/include/Poco/FIFOBuffer.h +++ b/Foundation/include/Poco/FIFOBuffer.h @@ -325,7 +325,7 @@ public: if (!isWritable()) throw Poco::InvalidAccessException("Buffer not writable."); - std::memcpy(&_buffer[_used], ptr, length * sizeof(T)); + std::memcpy(begin() + _used, ptr, length * sizeof(T)); std::size_t usedBefore = _used; _used += length; if (_notify) notify(usedBefore);