diff options
Diffstat (limited to 'src/modules/metacontacts')
-rw-r--r-- | src/modules/metacontacts/meta_edit.cpp | 6 | ||||
-rw-r--r-- | src/modules/metacontacts/meta_menu.cpp | 2 | ||||
-rw-r--r-- | src/modules/metacontacts/meta_services.cpp | 4 | ||||
-rw-r--r-- | src/modules/metacontacts/meta_utils.cpp | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/metacontacts/meta_edit.cpp b/src/modules/metacontacts/meta_edit.cpp index 2a6de57602..7938b398be 100644 --- a/src/modules/metacontacts/meta_edit.cpp +++ b/src/modules/metacontacts/meta_edit.cpp @@ -71,10 +71,10 @@ static void FillContactList(HWND hList) if (!db_get(g_data.hContact[i], szProto, szField, &dbv)) {
switch (dbv.type) {
case DBVT_ASCIIZ:
- _tcsncpy(buff, _A2T(dbv.pszVal), SIZEOF(buff));
+ _tcsncpy_s(buff, _A2T(dbv.pszVal), _TRUNCATE);
break;
case DBVT_WCHAR:
- _tcsncpy(buff, dbv.ptszVal, SIZEOF(buff));
+ _tcsncpy_s(buff, dbv.ptszVal, _TRUNCATE);
break;
case DBVT_BYTE:
_itot(dbv.bVal, buff, 10);
@@ -166,7 +166,7 @@ static void ApplyChanges() PROTO_AVATAR_INFORMATIONT AI = { sizeof(AI) };
AI.hContact = g_data.hMeta;
AI.format = PA_FORMAT_UNKNOWN;
- _tcscpy(AI.filename, _T("X"));
+ _tcsncpy_s(AI.filename, _T("X"), _TRUNCATE);
if (CallProtoService(META_PROTO, PS_GETAVATARINFOT, 0, (LPARAM)&AI) == GAIR_SUCCESS)
db_set_ts(g_data.hMeta, "ContactPhoto", "File", AI.filename);
}
diff --git a/src/modules/metacontacts/meta_menu.cpp b/src/modules/metacontacts/meta_menu.cpp index 4dc8c390c1..af8a2177f6 100644 --- a/src/modules/metacontacts/meta_menu.cpp +++ b/src/modules/metacontacts/meta_menu.cpp @@ -162,7 +162,7 @@ void Meta_RemoveContactNumber(DBCachedContact *ccMeta, int number, bool bUpdateI PROTO_AVATAR_INFORMATIONT AI = { sizeof(AI) };
AI.hContact = ccMeta->contactID;
AI.format = PA_FORMAT_UNKNOWN;
- _tcscpy(AI.filename, _T("X"));
+ _tcsncpy_s(AI.filename, _T("X"), _TRUNCATE);
if (CallProtoService(META_PROTO, PS_GETAVATARINFOT, 0, (LPARAM)&AI) == GAIR_SUCCESS)
db_set_ts(ccMeta->contactID, "ContactPhoto", "File", AI.filename);
diff --git a/src/modules/metacontacts/meta_services.cpp b/src/modules/metacontacts/meta_services.cpp index 033afc4b25..0a36da6572 100644 --- a/src/modules/metacontacts/meta_services.cpp +++ b/src/modules/metacontacts/meta_services.cpp @@ -448,7 +448,7 @@ int Meta_SettingChanged(WPARAM hContact, LPARAM lParam) PROTO_AVATAR_INFORMATIONT AI = { sizeof(AI) };
AI.hContact = ccMeta->contactID;
AI.format = PA_FORMAT_UNKNOWN;
- _tcscpy(AI.filename, _T("X"));
+ _tcsncpy_s(AI.filename, _T("X"), _TRUNCATE);
if (CallProtoService(META_PROTO, PS_GETAVATARINFOT, 0, (LPARAM)&AI) == GAIR_SUCCESS)
db_set_ts(ccMeta->contactID, "ContactPhoto", "File", AI.filename);
}
@@ -798,7 +798,7 @@ INT_PTR Meta_GetInfo(WPARAM wParam, LPARAM lParam) AI.cbSize = sizeof(AI);
AI.hContact = ccs->hContact;
AI.format = PA_FORMAT_UNKNOWN;
- _tcscpy(AI.filename, _T("X"));
+ _tcsncpy_s(AI.filename, _T("X"), _TRUNCATE);
if (CallProtoService(META_PROTO, PS_GETAVATARINFOT, 0, (LPARAM)&AI) == GAIR_SUCCESS)
db_set_ts(ccs->hContact, "ContactPhoto", "File", AI.filename);
diff --git a/src/modules/metacontacts/meta_utils.cpp b/src/modules/metacontacts/meta_utils.cpp index 6955973266..761948b0b4 100644 --- a/src/modules/metacontacts/meta_utils.cpp +++ b/src/modules/metacontacts/meta_utils.cpp @@ -195,7 +195,7 @@ BOOL Meta_Assign(MCONTACT hSub, MCONTACT hMeta, BOOL set_as_default) AI.cbSize = sizeof(AI);
AI.hContact = hMeta;
AI.format = PA_FORMAT_UNKNOWN;
- _tcscpy(AI.filename, _T("X"));
+ _tcsncpy_s(AI.filename, _T("X"), _TRUNCATE);
if (CallProtoService(META_PROTO, PS_GETAVATARINFOT, 0, (LPARAM)&AI) == GAIR_SUCCESS)
db_set_ts(hMeta, "ContactPhoto", "File", AI.filename);
|