From 1b7857fc8136af71c8d623c68748eec0cb6905d2 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Mon, 4 Mar 2013 11:13:14 +0100 Subject: [PATCH] Fix one more possible crash in TunnelManager if the ip address is NULL. --- coreapi/TunnelManager.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/coreapi/TunnelManager.cc b/coreapi/TunnelManager.cc index 4828bf11..d1020b1b 100644 --- a/coreapi/TunnelManager.cc +++ b/coreapi/TunnelManager.cc @@ -102,6 +102,10 @@ int TunnelManager::eXosipSelect(int max_fds, fd_set *s1, fd_set *s2, fd_set *s3, void TunnelManager::addServer(const char *ip, int port,unsigned int udpMirrorPort,unsigned int delay) { + if (ip == NULL) { + ip = ""; + ms_warning("Adding tunnel server with empty ip, it will not work!"); + } addServer(ip,port); mUdpMirrorClients.push_back(UdpMirrorClient(ServerAddr(ip,udpMirrorPort),delay)); } -- 2.39.2