Skip to content

Commit 9e1ea1b

Browse files
committed
add ptr check
1 parent 8f7386e commit 9e1ea1b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ProxyChannel.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13841,7 +13841,7 @@ void UDPProxySocket::SetForwardDestination(const Address & srcIP, WORD srcPort,
1384113841

1384213842
// doing port detection and forward source is already set (probably by port detection) and set to same as forward dest -> swap the directions (OR skip the setting ?)
1384313843
H245_UnicastAddress fSrc = SocketToH245UnicastAddr(fSrcIP, fSrcPort); // for easy comparison
13844-
if (m_ignoreSignaledIPs && fSrc == *dstAddr) {
13844+
if (m_ignoreSignaledIPs && dstAddr && fSrc == *dstAddr) {
1384513845
PTRACE(7, "JW RTP swap directions before SetForwardDestination to avoid loop");
1384613846
swap(fSrcIP, rSrcIP); swap(fSrcPort, rSrcPort);
1384713847
swap(fDestIP, rDestIP); swap(fDestPort, rDestPort);
@@ -13906,7 +13906,7 @@ void UDPProxySocket::SetReverseDestination(const Address & srcIP, WORD srcPort,
1390613906

1390713907
// doing port detection and reverse source is already set (probably by port detection) and set to same as reverse dest -> swap the directions (OR skip the setting ?)
1390813908
H245_UnicastAddress rSrc = SocketToH245UnicastAddr(rSrcIP, rSrcPort); // for easy comparison
13909-
if (m_ignoreSignaledIPs && rSrc == *dstAddr) {
13909+
if (m_ignoreSignaledIPs && dstAddr && rSrc == *dstAddr) {
1391013910
PTRACE(7, "JW RTP swap directions before SetReverseDestination to avoid loop");
1391113911
swap(fSrcIP, rSrcIP); swap(fSrcPort, rSrcPort);
1391213912
swap(fDestIP, rDestIP); swap(fDestPort, rDestPort);

0 commit comments

Comments
 (0)