inspircd

A modular C++ IRC daemon (ircd). https://www.inspircd.org/
Log | Files | Refs | README

commit f37590259eeb5cb9634773c000ea8f0fa083683a
parent 499121036c26a66a7b8b6195c8b837349f42df6c
Author: Peter Powell <petpow@saberuk.com>
Date:   Thu,  7 Feb 2019 17:35:44 +0000

Fix erroneously limiting to the size of sa instead of sun_path.

Diffstat:
Msrc/socket.cpp | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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;