From 4c814798c7bc7f6a0f92c21b027b26290622aa2f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 19 Jun 2015 19:35:42 +0000 Subject: SIZEOF replaced with more secure analog - _countof git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Yahoo/src/avatar.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'protocols/Yahoo/src/avatar.cpp') diff --git a/protocols/Yahoo/src/avatar.cpp b/protocols/Yahoo/src/avatar.cpp index 35af086732..002764f165 100644 --- a/protocols/Yahoo/src/avatar.cpp +++ b/protocols/Yahoo/src/avatar.cpp @@ -126,8 +126,8 @@ void CYahooProto::SendAvatar(const TCHAR *szFile) sf->filesize = statbuf.st_size; wchar_t tszFilename[MAX_PATH]; - wcsncpy(tszFilename, szFile, SIZEOF(tszFilename) - 1); - GetShortPathNameW(szFile, tszFilename, SIZEOF(tszFilename)); + wcsncpy(tszFilename, szFile, _countof(tszFilename) - 1); + GetShortPathNameW(szFile, tszFilename, _countof(tszFilename)); char szFilename[MAX_PATH]; WideCharToMultiByte(CP_ACP, 0, tszFilename, -1, szFilename, MAX_PATH, 0, 0); sf->filename = strdup(szFilename); @@ -468,7 +468,7 @@ void CYahooProto::ext_got_picture_checksum(const char *me, const char *who, int // Need to delete the Avatar File!! TCHAR szFile[MAX_PATH]; - GetAvatarFileName(hContact, szFile, SIZEOF(szFile) - 1, 0); + GetAvatarFileName(hContact, szFile, _countof(szFile) - 1, 0); DeleteFile(szFile); // Reset the avatar and cleanup. @@ -651,7 +651,7 @@ INT_PTR __cdecl CYahooProto::GetAvatarInfo(WPARAM wParam, LPARAM lParam) if (getDword(pai->hContact, "PictCK", 0) == 0) return GAIR_NOAVATAR; - GetAvatarFileName(pai->hContact, pai->filename, SIZEOF(pai->filename), getByte(pai->hContact, "AvatarType", 0)); + GetAvatarFileName(pai->hContact, pai->filename, _countof(pai->filename), getByte(pai->hContact, "AvatarType", 0)); pai->format = PA_FORMAT_PNG; debugLogA("[YAHOO_GETAVATARINFO] filename: %s", pai->filename); -- cgit v1.2.3