Skip to content

Commit 65d92fd

Browse files
committed
SSDP: Check that the peer address is available before doing the local network check.
Refs #12305 (cherry picked from commit d20c163)
1 parent 9a72d02 commit 65d92fd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mythtv/libs/libmythupnp/ssdp.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,8 @@ void SSDP::ProcessData( MSocketDevice *pSocket )
325325
//
326326
// TODO: We may want to restrict this to the same subnet as the server
327327
// for added security
328-
if (((peerAddress.protocol() == QAbstractSocket::IPv4Protocol) &&
328+
if (!peerAddress.isNull() && (peerAddress != QHostAddress::Null) &&
329+
((peerAddress.protocol() == QAbstractSocket::IPv4Protocol) &&
329330
(!peerAddress.isInSubnet(QHostAddress("172.16.0.0"), 12) &&
330331
!peerAddress.isInSubnet(QHostAddress("192.168.0.0"), 16) &&
331332
!peerAddress.isInSubnet(QHostAddress("10.0.0.0"), 8))) ||

0 commit comments

Comments
 (0)