aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormontellese <montellese@xbmc.org>2012-05-12 21:23:52 +0200
committermontellese <montellese@xbmc.org>2012-05-12 21:23:52 +0200
commitb8a3e19185fee39380b080f7e91a1e1c3dbf3a5b (patch)
tree962f6bf130ce9d3cfe2ad78de0608e238a6dbabb
parentfccca034d189dd640fd15cd494fef522e1bd21e7 (diff)
websocket: use memcpy instead of strncpy if there can be \0 values in the copied buffer (fixes #12995)
-rw-r--r--xbmc/network/websocket/WebSocket.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/xbmc/network/websocket/WebSocket.cpp b/xbmc/network/websocket/WebSocket.cpp
index f9c6ff5440..d4f390d376 100644
--- a/xbmc/network/websocket/WebSocket.cpp
+++ b/xbmc/network/websocket/WebSocket.cpp
@@ -232,7 +232,7 @@ CWebSocketFrame::CWebSocketFrame(WebSocketFrameOpcode opcode, const char* data /
// Get the whole data
m_lengthFrame = buffer.size();
m_data = new char[(uint32_t)m_lengthFrame];
- strncpy((char *)m_data, buffer.c_str(), (uint32_t)m_lengthFrame);
+ memcpy((char *)m_data, buffer.c_str(), (uint32_t)m_lengthFrame);
if (data)
{