From 714a4367ebb95273d9ccbf32da349962a19c75fd Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 18 Sep 2015 05:43:41 +0000 Subject: MimCmd: memory overrun fix git-svn-id: http://svn.miranda-ng.org/main/trunk@15376 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MimCmd/src/commands.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/MimCmd/src/commands.cpp b/plugins/MimCmd/src/commands.cpp index 03c37c55a2..11874d19d7 100644 --- a/plugins/MimCmd/src/commands.cpp +++ b/plugins/MimCmd/src/commands.cpp @@ -40,7 +40,7 @@ int ConnectToMiranda() TCHAR *p = _tcsrchr(tszPath, '\\'); if (p) p[1] = 0; - _tcsncat(tszPath, _T("libs"), _TRUNCATE); + _tcsncat_s(tszPath, _T("libs"), _countof(tszPath) - mir_tstrlen(tszPath)); DWORD cbPath = (DWORD)_tcslen(tszPath); DWORD cbSize = GetEnvironmentVariable(_T("PATH"), NULL, 0); -- cgit v1.2.3