From 4c814798c7bc7f6a0f92c21b027b26290622aa2f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 19 Jun 2015 19:35:42 +0000 Subject: SIZEOF replaced with more secure analog - _countof git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/ConnectionNotify/src/netstat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/ConnectionNotify/src/netstat.cpp') diff --git a/plugins/ConnectionNotify/src/netstat.cpp b/plugins/ConnectionNotify/src/netstat.cpp index 8f0eaa2155..a12dfb0837 100644 --- a/plugins/ConnectionNotify/src/netstat.cpp +++ b/plugins/ConnectionNotify/src/netstat.cpp @@ -42,14 +42,14 @@ struct CONNECTION *GetConnectionsTable() IpAddr.S_un.S_addr = (ULONG)pTcpTable->table[i].dwLocalAddr; //_snprintf(newConn->strIntIp,_countof(newConn->strIntIp),"%d.%d.%d.%d",IpAddr.S_un.S_un_b.s_b1,IpAddr.S_un.S_un_b.s_b2,IpAddr.S_un.S_un_b.s_b3,IpAddr.S_un.S_un_b.s_b4); TCHAR *strIntIp = mir_a2t(inet_ntoa(IpAddr)); - _tcsncpy(newConn->strIntIp, strIntIp, SIZEOF(newConn->strIntIp) - 1); + _tcsncpy(newConn->strIntIp, strIntIp, _countof(newConn->strIntIp) - 1); mir_free(strIntIp); } if (pTcpTable->table[i].dwRemoteAddr) { IpAddr.S_un.S_addr = (u_long)pTcpTable->table[i].dwRemoteAddr; TCHAR *strExtIp = mir_a2t(inet_ntoa(IpAddr)); - _tcsncpy(newConn->strExtIp, strExtIp, SIZEOF(newConn->strExtIp) - 1); + _tcsncpy(newConn->strExtIp, strExtIp, _countof(newConn->strExtIp) - 1); mir_free(strExtIp); } newConn->state = pTcpTable->table[i].dwState; -- cgit v1.2.3