summaryrefslogtreecommitdiff
path: root/src/socket.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-02-07 17:35:44 +0000
committerPeter Powell <petpow@saberuk.com>2019-02-07 17:35:44 +0000
commitf37590259eeb5cb9634773c000ea8f0fa083683a (patch)
tree997ede5d9b8e6c385ace88871218ad3bf6d5cd7f /src/socket.cpp
parent499121036c26a66a7b8b6195c8b837349f42df6c (diff)
Fix erroneously limiting to the size of sa instead of sun_path.
Diffstat (limited to 'src/socket.cpp')
-rw-r--r--src/socket.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/socket.cpp b/src/socket.cpp
index 759bc7272..abccd0408 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -181,7 +181,7 @@ bool irc::sockets::aptosa(const std::string& addr, int port, irc::sockets::socka
bool irc::sockets::untosa(const std::string& path, irc::sockets::sockaddrs& sa)
{
memset(&sa, 0, sizeof(sa));
- if (path.length() >= sizeof(sa))
+ if (path.length() >= sizeof(sa.un.sun_path))
return false;
sa.un.sun_family = AF_UNIX;