summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-01-10 19:09:02 +0000
committerPeter Powell <petpow@saberuk.com>2019-01-10 19:09:02 +0000
commit100c6c419c319663c43796d5d69f738df8d0f583 (patch)
tree79762f35045d0e503a4a99d01dcf19226af504eb
parent21ae8e31440c40c5168f8451558a308b1317a2f7 (diff)
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.
-rw-r--r--src/modules/m_haproxy.cpp2
1 files changed, 1 insertions, 1 deletions
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;