From 100c6c419c319663c43796d5d69f738df8d0f583 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Thu, 10 Jan 2019 19:09:02 +0000 Subject: Fix copying too much data into the remote endpoint field. This is a buffer overrun but its harmless as the things it will overwrite are no longer necessary. --- src/modules/m_haproxy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/m_haproxy.cpp b/src/modules/m_haproxy.cpp index e92c45686..c5b7dddd8 100644 --- a/src/modules/m_haproxy.cpp +++ b/src/modules/m_haproxy.cpp @@ -240,7 +240,7 @@ class HAProxyHook : public IOHookMiddle { case AF_INET: memcpy(&client.in4.sin_addr.s_addr, &recvq[0], 4); - memcpy(&server.in4.sin_addr.s_addr, &recvq[4], 8); + memcpy(&server.in4.sin_addr.s_addr, &recvq[4], 4); memcpy(&client.in4.sin_port, &recvq[8], 2); memcpy(&server.in4.sin_port, &recvq[10], 2); tlv_index = 12; -- cgit v1.2.3