diff options
author | Peter Powell <petpow@saberuk.com> | 2019-02-07 17:35:44 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-02-07 17:35:44 +0000 |
commit | f37590259eeb5cb9634773c000ea8f0fa083683a (patch) | |
tree | 997ede5d9b8e6c385ace88871218ad3bf6d5cd7f /src/socket.cpp | |
parent | 499121036c26a66a7b8b6195c8b837349f42df6c (diff) |
Fix erroneously limiting to the size of sa instead of sun_path.
Diffstat (limited to 'src/socket.cpp')
-rw-r--r-- | src/socket.cpp | 2 |
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; |