From c74c3c728527f9ef35e52f567e28653d078e9f2b Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 16 May 2015 16:06:42 +0000 Subject: correct version of [13616] git-svn-id: http://svn.miranda-ng.org/main/trunk@13621 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/modern_skinengine.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/Clist_modern/src/modern_skinengine.cpp') diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp index 01fe67e752..ed4f9f5b1f 100644 --- a/plugins/Clist_modern/src/modern_skinengine.cpp +++ b/plugins/Clist_modern/src/modern_skinengine.cpp @@ -320,9 +320,9 @@ BOOL IniParser::_DoParseLine(char *szLine) if (*ebuf == '\0') return FALSE; // no close bracket - DWORD sectionLen = ebuf - tbuf; + DWORD sectionLen = ebuf - tbuf + 1; _szSection = (char*)mir_alloc(sectionLen + 1); - strncpy(_szSection, tbuf, sectionLen); + mir_strncpy(_szSection, tbuf, sectionLen); _szSection[sectionLen] = '\0'; } return TRUE; @@ -1853,9 +1853,9 @@ static void RegisterMaskByParce(const char *szSetting, char *szValue, SKINOBJECT int res; DWORD ID = atoi(szSetting + 1); Mask = szValue + i + 1; - Obj = (char*)mir_alloc(i + 1); - strncpy(Obj, szValue, i); - Obj[i] = '\0'; + Obj = (char*)mir_alloc(i + 2); + mir_strncpy(Obj, szValue, i + 1); + Obj[i + 1] = '\0'; res = AddStrModernMaskToList(ID, Mask, Obj, pSkin->pMaskList); mir_free(Obj); } -- cgit v1.2.3