summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/svc_contactinfo.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-11-30 13:03:10 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-11-30 13:03:10 +0000
commit46789bd14d5fc7448dbd1b68138a8b08964353bc (patch)
tree27851079c9870206fe7ccb9e2248dff8ff550af2 /plugins/UserInfoEx/src/svc_contactinfo.cpp
parent1f91ea192b7cbc5265e9bca4c69fcbc157402cfa (diff)
safe lstr* replacements: mir_strlen, mir_wstrlen, mir_strcpy, mir_wstrcpy,
mir_strncpy, mir_wstrncpy, mir_strcat, mir_wstrcat, mir_strncat, mir_wstrncat git-svn-id: http://svn.miranda-ng.org/main/trunk@11171 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/svc_contactinfo.cpp')
-rw-r--r--plugins/UserInfoEx/src/svc_contactinfo.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/UserInfoEx/src/svc_contactinfo.cpp b/plugins/UserInfoEx/src/svc_contactinfo.cpp
index 92ccdf4050..f0faf6faaa 100644
--- a/plugins/UserInfoEx/src/svc_contactinfo.cpp
+++ b/plugins/UserInfoEx/src/svc_contactinfo.cpp
@@ -233,8 +233,8 @@ static FORCEINLINE INT_PTR GCIFirstLast(CONTACTINFO *ci)
if (type == DBVT_WCHAR) {
// both firstname and lastname are valid
if (dbvf.type == DBVT_WCHAR && dbvl.type == DBVT_WCHAR) {
- cbf = mir_wcslen(dbvf.pwszVal);
- cbl = mir_wcslen(dbvl.pwszVal);
+ cbf = mir_wstrlen(dbvf.pwszVal);
+ cbl = mir_wstrlen(dbvl.pwszVal);
ci->pszVal = (LPTSTR) mir_alloc((cbf + cbl + 2) * sizeof(WCHAR));
if (ci->pszVal)
@@ -549,7 +549,7 @@ INT_PTR GetContactInfo(WPARAM wParam, LPARAM lParam)
if (ci->dwFlag & CNF_UNICODE) {
WCHAR wszDate[80];
if (GetDateFormatW(LOCALE_USER_DEFAULT, wParam == 1 ? DATE_LONGDATE : DATE_SHORTDATE, &st, NULL, wszDate, SIZEOF(wszDate)))
- ci->pszVal = (LPTSTR)mir_wcsdup(wszDate);
+ ci->pszVal = (LPTSTR)mir_wstrdup(wszDate);
}
else {
CHAR szDate[80];
@@ -674,7 +674,7 @@ INT_PTR GetContactInfo(WPARAM wParam, LPARAM lParam)
default: // unknown contact
if (ci->dwFlag & CNF_UNICODE)
- ci->pszVal = (LPTSTR)mir_wcsdup(TranslateW(L"'(Unknown Contact)'"));
+ ci->pszVal = (LPTSTR)mir_wstrdup(TranslateW(L"'(Unknown Contact)'"));
else
ci->pszVal = (LPTSTR)mir_strdup(Translate("'(Unknown Contact)'"));