]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix erroneously limiting to the size of sa instead of sun_path.
authorPeter Powell <petpow@saberuk.com>
Thu, 7 Feb 2019 17:35:44 +0000 (17:35 +0000)
committerPeter Powell <petpow@saberuk.com>
Thu, 7 Feb 2019 17:35:44 +0000 (17:35 +0000)
src/socket.cpp

index 759bc727277c7fc309810b43cf7378c9a1c29864..abccd04084c3d58a0908898c27805bef9f337296 100644 (file)
@@ -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;