From fdc55e54ccfe1b3fed3b1b687ff8d874f317df3a Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 17 Mar 2015 12:56:31 +0100 Subject: [PATCH] family variable can be unset when matching any address --- common/network/TcpSocket.cxx | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.39.5