From 4fa9a8b4f873f5a97c74c3cac6fc1384b9b22f17 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 28 May 2015 15:44:18 +0000 Subject: unsafe strncat removed git-svn-id: http://svn.miranda-ng.org/main/trunk@13876 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_nicer/src/extBackg.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'plugins/Clist_nicer/src/extBackg.cpp') diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp index bf285973c1..4e441c8c98 100644 --- a/plugins/Clist_nicer/src/extBackg.cpp +++ b/plugins/Clist_nicer/src/extBackg.cpp @@ -288,11 +288,10 @@ void LoadExtBkSettingsFromDB() ID_EXTBK_LAST++; mir_snprintf(p->szDBname, SIZEOF(p->szDBname), "EXBK_%s", accs[i]->szModuleName); - if (i == 0) { - mir_strncpy(p->szName, "{-}", SIZEOF(p->szName)); - mir_strncat(p->szName, accs[i]->szModuleName, SIZEOF(p->szName) - mir_strlen(p->szName)); - } - else mir_strncpy(p->szName, accs[i]->szModuleName, SIZEOF(p->szName)); + if (i == 0) + mir_snprintf(p->szName, SIZEOF(p->szName), "{-}%s", accs[i]->szModuleName); + else + strncpy_s(p->szName, accs[i]->szModuleName, _TRUNCATE); p->statusID = ID_EXTBK_LAST; arStatusItems.insert(p); } -- cgit v1.2.3