From: Ghislain MARY Date: Mon, 4 Mar 2013 10:13:14 +0000 (+0100) Subject: Fix one more possible crash in TunnelManager if the ip address is NULL. X-Git-Url: http://sjero.net/git/?p=linphone;a=commitdiff_plain;h=1b7857fc8136af71c8d623c68748eec0cb6905d2 Fix one more possible crash in TunnelManager if the ip address is NULL. --- 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)); }