diff options
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/AimOscar/src/services.cpp | 2 | ||||
| -rw-r--r-- | protocols/FacebookRM/src/avatars.cpp | 2 | ||||
| -rw-r--r-- | protocols/GTalkExt/src/handlers.cpp | 2 | ||||
| -rw-r--r-- | protocols/Gadu-Gadu/src/image.cpp | 6 | ||||
| -rw-r--r-- | protocols/Gadu-Gadu/src/import.cpp | 18 | ||||
| -rw-r--r-- | protocols/IRCG/src/options.cpp | 2 | ||||
| -rw-r--r-- | protocols/IcqOscarJ/src/icqosc_svcs.cpp | 2 | ||||
| -rw-r--r-- | protocols/MSN/src/msn_chat.cpp | 4 | ||||
| -rw-r--r-- | protocols/Sametime/src/userlist.cpp | 10 | ||||
| -rw-r--r-- | protocols/SkypeWeb/src/skype_avatars.cpp | 4 | ||||
| -rw-r--r-- | protocols/Steam/src/steam_avatars.cpp | 2 | ||||
| -rw-r--r-- | protocols/Tlen/src/tlen_opt.cpp | 4 | ||||
| -rw-r--r-- | protocols/Tlen/src/tlen_thread.cpp | 4 | ||||
| -rw-r--r-- | protocols/Tox/src/tox_transfer.cpp | 2 | ||||
| -rw-r--r-- | protocols/Twitter/src/connection.cpp | 4 | ||||
| -rw-r--r-- | protocols/Twitter/src/ui.cpp | 4 | ||||
| -rw-r--r-- | protocols/VKontakte/src/vk_avatars.cpp | 4 | ||||
| -rw-r--r-- | protocols/Yahoo/src/avatar.cpp | 2 | 
18 files changed, 39 insertions, 39 deletions
diff --git a/protocols/AimOscar/src/services.cpp b/protocols/AimOscar/src/services.cpp index 01944ef024..25a6eb9012 100644 --- a/protocols/AimOscar/src/services.cpp +++ b/protocols/AimOscar/src/services.cpp @@ -413,7 +413,7 @@ INT_PTR CAimProto::GetAvatar(WPARAM wParam, LPARAM lParam)  	PROTO_AVATAR_INFORMATIONT ai = { sizeof(ai) };
  	if (GetAvatarInfo(0, (LPARAM)&ai) == GAIR_SUCCESS)
  	{
 -		_tcsncpy(buf, ai.filename, size);
 +		mir_tstrncpy(buf, ai.filename, size);
  		buf[size-1] = 0;
  		return 0;
  	}
 diff --git a/protocols/FacebookRM/src/avatars.cpp b/protocols/FacebookRM/src/avatars.cpp index 3f9dfa0994..3a87ed85af 100644 --- a/protocols/FacebookRM/src/avatars.cpp +++ b/protocols/FacebookRM/src/avatars.cpp @@ -223,7 +223,7 @@ INT_PTR FacebookProto::GetMyAvatar(WPARAM wParam, LPARAM lParam)  	PROTO_AVATAR_INFORMATIONT ai = { sizeof(ai) };
  	switch (GetAvatarInfo(0, (LPARAM)&ai)) {
  	case GAIR_SUCCESS:
 -		_tcsncpy(buf, ai.filename, size);
 +		mir_tstrncpy(buf, ai.filename, size);
  		buf[size - 1] = 0;
  		return 0;
 diff --git a/protocols/GTalkExt/src/handlers.cpp b/protocols/GTalkExt/src/handlers.cpp index 16af0a823e..8f4c54600b 100644 --- a/protocols/GTalkExt/src/handlers.cpp +++ b/protocols/GTalkExt/src/handlers.cpp @@ -67,7 +67,7 @@ LPTSTR ExtractJid(LPCTSTR jidWithRes)  	size_t l = size_t(p - jidWithRes);
  	LPTSTR result = (LPTSTR)mir_alloc((l + 1) * sizeof(TCHAR));
 -	_tcsncpy(result, jidWithRes, l);
 +	mir_tstrncpy(result, jidWithRes, l);
  	result[l] = 0;
  	return result;
  }
 diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp index 7fccf30251..56528ba82b 100644 --- a/protocols/Gadu-Gadu/src/image.cpp +++ b/protocols/Gadu-Gadu/src/image.cpp @@ -226,10 +226,10 @@ TCHAR *gg_img_getfilter(TCHAR *szFilter, int nSize)  	szFilterMask = _T("*.bmp;*.gif;*.jpeg;*.jpg;*.png");
  	// Make up filter
 -	_tcsncpy(pFilter, szFilterName, nSize);
 +	mir_tstrncpy(pFilter, szFilterName, nSize);
  	pFilter += mir_tstrlen(pFilter) + 1;
  	if (pFilter >= szFilter + nSize) return NULL;
 -	_tcsncpy(pFilter, szFilterMask, nSize - (pFilter - szFilter));
 +	mir_tstrncpy(pFilter, szFilterMask, nSize - (pFilter - szFilter));
  	pFilter += mir_tstrlen(pFilter) + 1;
  	if (pFilter >= szFilter + nSize) return NULL;
  	*pFilter = 0;
 @@ -251,7 +251,7 @@ int gg_img_saveimage(HWND hwnd, GGIMAGEENTRY *dat)  	gg_img_getfilter(szFilter, SIZEOF(szFilter));
  	TCHAR szFileName[MAX_PATH];
 -	_tcsncpy(szFileName, dat->lpszFileName, SIZEOF(szFileName));
 +	mir_tstrncpy(szFileName, dat->lpszFileName, SIZEOF(szFileName));
  	OPENFILENAME ofn = {0};
  	ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
 diff --git a/protocols/Gadu-Gadu/src/import.cpp b/protocols/Gadu-Gadu/src/import.cpp index 2b903179bb..42ee730f8e 100644 --- a/protocols/Gadu-Gadu/src/import.cpp +++ b/protocols/Gadu-Gadu/src/import.cpp @@ -336,24 +336,24 @@ INT_PTR GGPROTO::import_text(WPARAM wParam, LPARAM lParam)  	OPENFILENAME ofn = {0};
  	ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
 -	_tcsncpy(filter, TranslateT("Text files"), SIZEOF(filter));
 +	mir_tstrncpy(filter, TranslateT("Text files"), SIZEOF(filter));
  	mir_tstrncat(filter, _T(" (*.txt)"), SIZEOF(filter) - mir_tstrlen(filter));
  	pfilter = filter + mir_tstrlen(filter) + 1;
  	if (pfilter >= filter + SIZEOF(filter))
  		return 0;
 -	_tcsncpy(pfilter, _T("*.TXT"), SIZEOF(filter) - (pfilter - filter));
 +	mir_tstrncpy(pfilter, _T("*.TXT"), SIZEOF(filter) - (pfilter - filter));
  	pfilter = pfilter + mir_tstrlen(pfilter) + 1;
  	if (pfilter >= filter + SIZEOF(filter))
  		return 0;
 -	_tcsncpy(pfilter, TranslateT("All Files"), SIZEOF(filter) - (pfilter - filter));
 +	mir_tstrncpy(pfilter, TranslateT("All Files"), SIZEOF(filter) - (pfilter - filter));
  	mir_tstrncat(pfilter, _T(" (*)"), SIZEOF(filter) - (pfilter - filter) - mir_tstrlen(pfilter));
  	pfilter = pfilter + mir_tstrlen(pfilter) + 1;
  	if (pfilter >= filter + SIZEOF(filter))
  		return 0;
 -	_tcsncpy(pfilter, _T("*"), SIZEOF(filter) - (pfilter - filter));
 +	mir_tstrncpy(pfilter, _T("*"), SIZEOF(filter) - (pfilter - filter));
  	pfilter = pfilter + mir_tstrlen(pfilter) + 1;
  	if (pfilter >= filter + SIZEOF(filter))
  		return 0;
 @@ -403,25 +403,25 @@ INT_PTR GGPROTO::export_text(WPARAM wParam, LPARAM lParam)  	OPENFILENAME ofn = {0};
  	TCHAR filter[512], *pfilter;
 -	_tcsncpy(str, TranslateT("contacts"), SIZEOF(str));
 +	mir_tstrncpy(str, TranslateT("contacts"), SIZEOF(str));
  	mir_tstrncat(str, _T(".txt"), SIZEOF(str) - mir_tstrlen(str));
  	ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
 -	_tcsncpy(filter, TranslateT("Text files"), SIZEOF(filter));
 +	mir_tstrncpy(filter, TranslateT("Text files"), SIZEOF(filter));
  	mir_tstrncat(filter, _T(" (*.txt)"), SIZEOF(filter) - mir_tstrlen(filter));
  	pfilter = filter + mir_tstrlen(filter) + 1;
  	if (pfilter >= filter + SIZEOF(filter))
  		return 0;
 -	_tcsncpy(pfilter, _T("*.TXT"), SIZEOF(filter) - (pfilter - filter));
 +	mir_tstrncpy(pfilter, _T("*.TXT"), SIZEOF(filter) - (pfilter - filter));
  	pfilter = pfilter + mir_tstrlen(pfilter) + 1;
  	if (pfilter >= filter + SIZEOF(filter))
  		return 0;
 -	_tcsncpy(pfilter, TranslateT("All Files"), SIZEOF(filter) - (pfilter - filter));
 +	mir_tstrncpy(pfilter, TranslateT("All Files"), SIZEOF(filter) - (pfilter - filter));
  	mir_tstrncat(pfilter, _T(" (*)"), SIZEOF(filter) - (pfilter - filter) - mir_tstrlen(pfilter));
  	pfilter = pfilter + mir_tstrlen(pfilter) + 1;
  	if (pfilter >= filter + SIZEOF(filter))
  		return 0;
 -	_tcsncpy(pfilter, _T("*"), SIZEOF(filter) - (pfilter - filter));
 +	mir_tstrncpy(pfilter, _T("*"), SIZEOF(filter) - (pfilter - filter));
  	pfilter = pfilter + mir_tstrlen(pfilter) + 1;
  	if (pfilter >= filter + SIZEOF(filter))
  		return 0;
 diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp index 24f51da361..29212e110d 100644 --- a/protocols/IRCG/src/options.cpp +++ b/protocols/IRCG/src/options.cpp @@ -1218,7 +1218,7 @@ CAddIgnoreDlg::CAddIgnoreDlg(CIrcProto* _pro, const TCHAR* mask, CIgnorePrefsDlg  	if (mask == NULL)
  		szOldMask[0] = 0;
  	else
 -		_tcsncpy(szOldMask, mask, SIZEOF(szOldMask));
 +		mir_tstrncpy(szOldMask, mask, SIZEOF(szOldMask));
  	m_Ok.OnClick = Callback(this, &CAddIgnoreDlg::OnOk);
  }
 diff --git a/protocols/IcqOscarJ/src/icqosc_svcs.cpp b/protocols/IcqOscarJ/src/icqosc_svcs.cpp index ff7c0d5f1f..89df241c17 100644 --- a/protocols/IcqOscarJ/src/icqosc_svcs.cpp +++ b/protocols/IcqOscarJ/src/icqosc_svcs.cpp @@ -391,7 +391,7 @@ INT_PTR CIcqProto::GetMyAvatar(WPARAM wParam, LPARAM lParam)  	TCHAR *tszFile = GetOwnAvatarFileName();
  	if (tszFile && !_taccess(tszFile, 0)) {
 -		_tcsncpy((TCHAR*)wParam, tszFile, (int)lParam);
 +		mir_tstrncpy((TCHAR*)wParam, tszFile, (int)lParam);
  		SAFE_FREE(&tszFile);
  		return 0;
  	}
 diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp index da9fd4f2b4..8f3e6e0ba6 100644 --- a/protocols/MSN/src/msn_chat.cpp +++ b/protocols/MSN/src/msn_chat.cpp @@ -47,14 +47,14 @@ int CMsnProto::MSN_ChatInit(GCThreadData *info, const char *pszID, const char *p  {
  	char *szNet, *szEmail;
 -	_tcsncpy(info->mChatID, _A2T(pszID), SIZEOF(info->mChatID));
 +	mir_tstrncpy(info->mChatID, _A2T(pszID), SIZEOF(info->mChatID));
  	parseWLID(NEWSTR_ALLOCA(pszID), &szNet, &szEmail, NULL);
  	info->netId = atoi(szNet);
  	mir_strncpy(info->szEmail, szEmail, sizeof(info->szEmail));
  	TCHAR szName[512];
  	InterlockedIncrement(&m_chatID);
 -	if (*pszTopic) _tcsncpy(szName, _A2T(pszTopic), SIZEOF(szName));
 +	if (*pszTopic) mir_tstrncpy(szName, _A2T(pszTopic), SIZEOF(szName));
  	else mir_sntprintf(szName, SIZEOF(szName), _T("%s %s%d"),
  		m_tszUserName, TranslateT("Chat #"), m_chatID);
 diff --git a/protocols/Sametime/src/userlist.cpp b/protocols/Sametime/src/userlist.cpp index 0fd6d87e72..aeb7b69156 100644 --- a/protocols/Sametime/src/userlist.cpp +++ b/protocols/Sametime/src/userlist.cpp @@ -673,10 +673,10 @@ void mwResolve_handler_callback(mwServiceResolve* srvc, guint32 id, guint32 code  	if (advanced == TRUE) {
  		// send column names
  		mcsr.psr.cbSize = 0;
 -		_tcsncpy(mcsr.pszFields[0], TranslateT("ID"), 512);
 -		_tcsncpy(mcsr.pszFields[1], TranslateT("Name"), 512);
 -		_tcsncpy(mcsr.pszFields[2], TranslateT("Description"), 512);
 -		_tcsncpy(mcsr.pszFields[3], TranslateT("Group?"), 512);
 +		mir_tstrncpy(mcsr.pszFields[0], TranslateT("ID"), 512);
 +		mir_tstrncpy(mcsr.pszFields[1], TranslateT("Name"), 512);
 +		mir_tstrncpy(mcsr.pszFields[2], TranslateT("Description"), 512);
 +		mir_tstrncpy(mcsr.pszFields[3], TranslateT("Group?"), 512);
  		proto->ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SEARCHRESULT, (HANDLE)id, (LPARAM)&mcsr);
  	}
 @@ -702,7 +702,7 @@ void mwResolve_handler_callback(mwServiceResolve* srvc, guint32 id, guint32 code  				mcsr.psr.group = (((mwResolveMatch *)mri->data)->type == mwResolveMatch_GROUP);
  				//MultiByteToWideChar(CP_UTF8, 0, mcsr.psr.name, -1, mcsr.pszFields[1], 512);
 -				_tcsncpy(mcsr.pszFields[3], mcsr.psr.group ? TranslateT("True") : TranslateT("False"), 512);
 +				mir_tstrncpy(mcsr.pszFields[3], mcsr.psr.group ? TranslateT("True") : TranslateT("False"), 512);
  				if (advanced == TRUE)
  					proto->ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SEARCHRESULT, (HANDLE)id, (LPARAM)&mcsr);
 diff --git a/protocols/SkypeWeb/src/skype_avatars.cpp b/protocols/SkypeWeb/src/skype_avatars.cpp index 9effeb2554..91f992f6a9 100644 --- a/protocols/SkypeWeb/src/skype_avatars.cpp +++ b/protocols/SkypeWeb/src/skype_avatars.cpp @@ -99,7 +99,7 @@ INT_PTR CSkypeProto::SvcGetAvatarInfo(WPARAM, LPARAM lParam)  	TCHAR tszFileName[MAX_PATH];
  	GetAvatarFileName(AI->hContact, tszFileName, SIZEOF(tszFileName));
 -	_tcsncpy(AI->filename, tszFileName, SIZEOF(AI->filename));
 +	mir_tstrncpy(AI->filename, tszFileName, SIZEOF(AI->filename));
  	if (::_taccess(AI->filename, 0) == 0 && !getBool(AI->hContact, "NeedNewAvatar", 0))
  		return GAIR_SUCCESS;
 @@ -118,7 +118,7 @@ INT_PTR CSkypeProto::SvcGetMyAvatar(WPARAM wParam, LPARAM lParam)  {
  	TCHAR path[MAX_PATH];
  	GetAvatarFileName(NULL, path, SIZEOF(path));
 -	_tcsncpy((TCHAR*)wParam, path, (int)lParam);
 +	mir_tstrncpy((TCHAR*)wParam, path, (int)lParam);
  	return 0;
  }
 diff --git a/protocols/Steam/src/steam_avatars.cpp b/protocols/Steam/src/steam_avatars.cpp index ec2694b878..a8f4a811f9 100644 --- a/protocols/Steam/src/steam_avatars.cpp +++ b/protocols/Steam/src/steam_avatars.cpp @@ -148,7 +148,7 @@ INT_PTR CSteamProto::GetMyAvatar(WPARAM wParam, LPARAM lParam)  	PROTO_AVATAR_INFORMATIONT ai = { sizeof(ai) };
  	switch (GetAvatarInfo(0, (LPARAM)&ai)) {
  	case GAIR_SUCCESS:
 -		_tcsncpy(buf, ai.filename, size);
 +		mir_tstrncpy(buf, ai.filename, size);
  		buf[size - 1] = 0;
  		return 0;
 diff --git a/protocols/Tlen/src/tlen_opt.cpp b/protocols/Tlen/src/tlen_opt.cpp index 6442ecf019..a710bc6cd2 100644 --- a/protocols/Tlen/src/tlen_opt.cpp +++ b/protocols/Tlen/src/tlen_opt.cpp @@ -602,8 +602,8 @@ static void MailPopupPreview(DWORD colorBack, DWORD colorText, TCHAR *title, TCH  	HICON hIcon = GetIcolibIcon(IDI_MAIL);  	ppd.lchIcon = CopyIcon(hIcon);  	ReleaseIcolibIcon(hIcon); -	_tcsncpy(ppd.lptzContactName, title, MAX_CONTACTNAME-1); -	_tcsncpy(ppd.lptzText, emailInfo,MAX_SECONDLINE-1); +	mir_tstrncpy(ppd.lptzContactName, title, MAX_CONTACTNAME-1); +	mir_tstrncpy(ppd.lptzText, emailInfo,MAX_SECONDLINE-1);  	ppd.colorBack = colorBack;  	ppd.colorText = colorText;  	ppd.iSeconds = delay; diff --git a/protocols/Tlen/src/tlen_thread.cpp b/protocols/Tlen/src/tlen_thread.cpp index c8aef49d25..d3eb3ddab4 100644 --- a/protocols/Tlen/src/tlen_thread.cpp +++ b/protocols/Tlen/src/tlen_thread.cpp @@ -1063,8 +1063,8 @@ static void TlenMailPopup(TlenProtocol *proto, char *title, char *emailInfo)  	POPUPDATAT ppd = { 0 };
  	ppd.lchIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_MAIL));
 -	_tcsncpy(ppd.lptzContactName, _A2T(title), MAX_CONTACTNAME -1);
 -	_tcsncpy(ppd.lptzText, _A2T(emailInfo), MAX_SECONDLINE - 1);
 +	mir_tstrncpy(ppd.lptzContactName, _A2T(title), MAX_CONTACTNAME -1);
 +	mir_tstrncpy(ppd.lptzText, _A2T(emailInfo), MAX_SECONDLINE - 1);
  	ppd.colorBack = db_get_dw(NULL, proto->m_szModuleName, "MailPopupBack", 0);
  	ppd.colorText = db_get_dw(NULL, proto->m_szModuleName, "MailPopupText", 0);
  	BYTE delayMode = db_get_b(NULL, proto->m_szModuleName, "MailPopupDelayMode", 0);
 diff --git a/protocols/Tox/src/tox_transfer.cpp b/protocols/Tox/src/tox_transfer.cpp index e1460b3d53..0b3d04b732 100644 --- a/protocols/Tox/src/tox_transfer.cpp +++ b/protocols/Tox/src/tox_transfer.cpp @@ -201,7 +201,7 @@ HANDLE CToxProto::OnSendFile(MCONTACT hContact, const PROTOCHAR*, PROTOCHAR **pp  	TCHAR *fileName = _tcsrchr(ppszFiles[0], '\\') + 1;
  	size_t fileDirLength = fileName - ppszFiles[0];
  	TCHAR *fileDir = (TCHAR*)mir_alloc(sizeof(TCHAR)*(fileDirLength + 1));
 -	_tcsncpy(fileDir, ppszFiles[0], fileDirLength);
 +	mir_tstrncpy(fileDir, ppszFiles[0], fileDirLength);
  	fileDir[fileDirLength] = '\0';
  	_fseeki64(hFile, 0, SEEK_END);
 diff --git a/protocols/Twitter/src/connection.cpp b/protocols/Twitter/src/connection.cpp index f793b09e0a..79d0e354ff 100644 --- a/protocols/Twitter/src/connection.cpp +++ b/protocols/Twitter/src/connection.cpp @@ -412,7 +412,7 @@ void TwitterProto::UpdateAvatarWorker(void *p)  		return; // lets just ignore unknown formats... if not it crashes miranda. should probably speak to borkra about this.
  	}
 -	_tcsncpy(ai.filename, filename.c_str(), MAX_PATH); // puts the local file name in the avatar struct, to a max of 260 chars (as of now)
 +	mir_tstrncpy(ai.filename, filename.c_str(), MAX_PATH); // puts the local file name in the avatar struct, to a max of 260 chars (as of now)
  	debugLogA("***** Updating avatar: %s", data->url.c_str());
  	mir_cslock lck(avatar_lock_);
 @@ -536,7 +536,7 @@ void TwitterProto::ShowContactPopup(MCONTACT hContact, const std::string &text,  	DBVARIANT dbv;
  	if (!db_get_ts(hContact, "CList", "MyHandle", &dbv) || !db_get_ts(hContact, m_szModuleName, TWITTER_KEY_UN, &dbv)) {
 -		_tcsncpy(popup.lptzContactName, dbv.ptszVal, MAX_CONTACTNAME);
 +		mir_tstrncpy(popup.lptzContactName, dbv.ptszVal, MAX_CONTACTNAME);
  		db_free(&dbv);
  	}
 diff --git a/protocols/Twitter/src/ui.cpp b/protocols/Twitter/src/ui.cpp index a0232d5da2..2dc2e9e6be 100644 --- a/protocols/Twitter/src/ui.cpp +++ b/protocols/Twitter/src/ui.cpp @@ -331,8 +331,8 @@ namespace popup_options  		// Pick a random quote
  		int q = rand() % SIZEOF(quotes);
 -		_tcsncpy(popup.lptzContactName, quotes[q].name, MAX_CONTACTNAME);
 -		_tcsncpy(popup.lptzText, quotes[q].text, MAX_SECONDLINE);
 +		mir_tstrncpy(popup.lptzContactName, quotes[q].name, MAX_CONTACTNAME);
 +		mir_tstrncpy(popup.lptzText, quotes[q].text, MAX_SECONDLINE);
  		popup.lchContact = hContact;
  		popup.iSeconds = get_timeout(hwndDlg);
 diff --git a/protocols/VKontakte/src/vk_avatars.cpp b/protocols/VKontakte/src/vk_avatars.cpp index 85740be99c..09d64881be 100644 --- a/protocols/VKontakte/src/vk_avatars.cpp +++ b/protocols/VKontakte/src/vk_avatars.cpp @@ -81,7 +81,7 @@ INT_PTR CVkProto::SvcGetAvatarInfo(WPARAM, LPARAM lParam)  	TCHAR tszFileName[MAX_PATH];
  	GetAvatarFileName(AI->hContact, tszFileName, SIZEOF(tszFileName));
 -	_tcsncpy(AI->filename, tszFileName, SIZEOF(AI->filename));
 +	mir_tstrncpy(AI->filename, tszFileName, SIZEOF(AI->filename));
  	AI->format = ProtoGetAvatarFormat(AI->filename);
 @@ -117,7 +117,7 @@ INT_PTR CVkProto::SvcGetMyAvatar(WPARAM wParam, LPARAM lParam)  	TCHAR* buf = (TCHAR*)wParam;
  	int size = (int)lParam;
 -	_tcsncpy(buf, AI.filename, size);
 +	mir_tstrncpy(buf, AI.filename, size);
  	buf[size - 1] = 0;
  	return 0;
 diff --git a/protocols/Yahoo/src/avatar.cpp b/protocols/Yahoo/src/avatar.cpp index 5b35f6b3d9..a269030c33 100644 --- a/protocols/Yahoo/src/avatar.cpp +++ b/protocols/Yahoo/src/avatar.cpp @@ -246,7 +246,7 @@ void __cdecl CYahooProto::recv_avatarthread(void *pavt)  	AI.cbSize = sizeof AI;
  	AI.format = PA_FORMAT_PNG;
  	AI.hContact = hContact;
 -	_tcsncpy(AI.filename, buf, SIZEOF(AI.filename)-1);
 +	mir_tstrncpy(AI.filename, buf, SIZEOF(AI.filename)-1);
  	if (error)
  		setDword(hContact, "PictCK", 0);
  | 
