diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-19 19:35:42 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-19 19:35:42 +0000 |
commit | 4c814798c7bc7f6a0f92c21b027b26290622aa2f (patch) | |
tree | 9bbfb38bd639f352300aa16ff7c45f5a9b2dba6d /protocols/Yahoo/src/avatar.cpp | |
parent | f0f0cd088f1ec3a85abee825ddbc214f3f6b92c3 (diff) |
SIZEOF replaced with more secure analog - _countof
git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Yahoo/src/avatar.cpp')
-rw-r--r-- | protocols/Yahoo/src/avatar.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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);
|