diff options
Diffstat (limited to 'common/network/TcpSocket.cxx')
-rw-r--r-- | common/network/TcpSocket.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/common/network/TcpSocket.cxx b/common/network/TcpSocket.cxx index 7ceff0b0..7056a080 100644 --- a/common/network/TcpSocket.cxx +++ b/common/network/TcpSocket.cxx @@ -238,9 +238,9 @@ char* TcpSocket::getMyAddress() { char* name = inet_ntoa(addr); if (name) { - return rfb::strDup(name); + return safe_strdup(name); } else { - return rfb::strDup(""); + return safe_strdup(""); } } @@ -268,9 +268,9 @@ char* TcpSocket::getPeerAddress() { char* name = inet_ntoa(addr); if (name) { - return rfb::strDup(name); + return safe_strdup(name); } else { - return rfb::strDup(""); + return safe_strdup(""); } } @@ -451,7 +451,7 @@ int TcpListener::getMyPort() { TcpFilter::TcpFilter(const char* spec) { rfb::CharArray tmp; - tmp.buf = rfb::strDup(spec); + tmp.buf = safe_strdup(spec); while (tmp.buf) { rfb::CharArray first; rfb::strSplit(tmp.buf, ',', &first.buf, &tmp.buf); @@ -541,9 +541,9 @@ char* TcpFilter::patternToStr(const TcpFilter::Pattern& p) { in_addr tmp; rfb::CharArray addr, mask; tmp.s_addr = p.address; - addr.buf = rfb::strDup(inet_ntoa(tmp)); + addr.buf = safe_strdup(inet_ntoa(tmp)); tmp.s_addr = p.mask; - mask.buf = rfb::strDup(inet_ntoa(tmp)); + mask.buf = safe_strdup(inet_ntoa(tmp)); char* result = new char[strlen(addr.buf)+1+strlen(mask.buf)+1+1]; switch (p.action) { case Accept: result[0] = '+'; break; |