summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-16 16:06:42 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-16 16:06:42 +0000
commitc74c3c728527f9ef35e52f567e28653d078e9f2b (patch)
treee8255a657d37dab7e1359155f45a855803cc7ad1 /plugins
parent912a6d5920d40d419588241cda4baadaceedb2be (diff)
correct version of [13616]
git-svn-id: http://svn.miranda-ng.org/main/trunk@13621 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Clist_modern/src/modern_skinengine.cpp10
-rw-r--r--plugins/Clist_modern/src/modern_skinselector.cpp6
2 files changed, 8 insertions, 8 deletions
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);
}
diff --git a/plugins/Clist_modern/src/modern_skinselector.cpp b/plugins/Clist_modern/src/modern_skinselector.cpp
index c809f2e64f..234ec3a4d0 100644
--- a/plugins/Clist_modern/src/modern_skinselector.cpp
+++ b/plugins/Clist_modern/src/modern_skinselector.cpp
@@ -464,7 +464,7 @@ WCHAR* GetParamN(WCHAR *string, WCHAR *buf, int buflen, BYTE paramN, WCHAR Delim
i--;
}
len = ((int)(i - start) < buflen) ? i - start : buflen;
- _tcsncpy(buf, string + start, len);
+ mir_tstrncpy(buf, string + start, len);
buf[len] = '\0';
}
else buf[0] = '\0';
@@ -489,8 +489,8 @@ char * GetParamN(char * string, char * buf, int buflen, BYTE paramN, char Delim,
while (i>1 && string[i - 1] == ' ' && i > (int)start)
i--;
}
- len = ((int)(i - start) < buflen) ? i - start : buflen;
- strncpy(buf, string + start, len);
+ len = ((int)(i - start) < buflen) ? i - start + 1 : buflen;
+ mir_strncpy(buf, string + start, len);
buf[len] = '\0';
}
else buf[0] = '\0';