aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2015-03-17 12:56:31 +0100
committerPierre Ossman <ossman@cendio.se>2015-03-17 12:56:31 +0100
commitfdc55e54ccfe1b3fed3b1b687ff8d874f317df3a (patch)
tree698755f6ca997ea0a52c9b77ccf057973b8cb770
parentead143f7637e4a5547c1e6ffe1548752b0ec683a (diff)
downloadtigervnc-fdc55e54ccfe1b3fed3b1b687ff8d874f317df3a.tar.gz
tigervnc-fdc55e54ccfe1b3fed3b1b687ff8d874f317df3a.zip
family variable can be unset when matching any address
-rw-r--r--common/network/TcpSocket.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/network/TcpSocket.cxx b/common/network/TcpSocket.cxx
index 6fca3018..47c2a048 100644
--- a/common/network/TcpSocket.cxx
+++ b/common/network/TcpSocket.cxx
@@ -848,6 +848,8 @@ TcpFilter::Pattern TcpFilter::parsePattern(const char* p) {
}
}
+ family = pattern.address.u.sa.sa_family;
+
if (pattern.prefixlen > (family == AF_INET ? 32: 128))
throw Exception("invalid prefix length for filter address: %u",
pattern.prefixlen);