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/MRA/src/Mra_options.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/MRA/src/Mra_options.cpp')
-rw-r--r-- | protocols/MRA/src/Mra_options.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/MRA/src/Mra_options.cpp b/protocols/MRA/src/Mra_options.cpp index 4bf263fb2c..b833a7cd22 100644 --- a/protocols/MRA/src/Mra_options.cpp +++ b/protocols/MRA/src/Mra_options.cpp @@ -37,10 +37,10 @@ INT_PTR CALLBACK DlgProcOptsAccount(HWND hWndDlg, UINT msg, WPARAM wParam, LPARA switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
TCHAR szBuff[MAX_EMAIL_LEN];
- GetDlgItemText(hWndDlg, IDC_LOGIN, szBuff, SIZEOF(szBuff));
+ GetDlgItemText(hWndDlg, IDC_LOGIN, szBuff, _countof(szBuff));
ppro->setTString(NULL, "e-mail", szBuff);
- if (GetDlgItemText(hWndDlg, IDC_PASSWORD, szBuff, SIZEOF(szBuff))) {
+ if (GetDlgItemText(hWndDlg, IDC_PASSWORD, szBuff, _countof(szBuff))) {
ppro->setTString("Password", szBuff);
SecureZeroMemory(szBuff, sizeof(szBuff));
}
@@ -87,10 +87,10 @@ INT_PTR CALLBACK DlgProcAccount(HWND hWndDlg, UINT msg, WPARAM wParam, LPARAM lP switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
TCHAR szBuff[MAX_EMAIL_LEN];
- GetDlgItemText(hWndDlg, IDC_LOGIN, szBuff, SIZEOF(szBuff));
+ GetDlgItemText(hWndDlg, IDC_LOGIN, szBuff, _countof(szBuff));
ppro->mraSetStringW(NULL, "e-mail", szBuff);
- if (GetDlgItemText(hWndDlg, IDC_PASSWORD, szBuff, SIZEOF(szBuff))) {
+ if (GetDlgItemText(hWndDlg, IDC_PASSWORD, szBuff, _countof(szBuff))) {
ppro->setTString("Password", szBuff);
SecureZeroMemory(szBuff, sizeof(szBuff));
}
@@ -186,7 +186,7 @@ INT_PTR CALLBACK DlgProcOptsConnections(HWND hWndDlg, UINT msg, WPARAM wParam, L switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
TCHAR szBuff[MAX_PATH];
- GetDlgItemText(hWndDlg, IDC_SERVER, szBuff, SIZEOF(szBuff));
+ GetDlgItemText(hWndDlg, IDC_SERVER, szBuff, _countof(szBuff));
ppro->mraSetStringW(NULL, "Server", szBuff);
ppro->setWord("ServerPort", (WORD)GetDlgItemInt(hWndDlg, IDC_SERVERPORT, NULL, FALSE));
ppro->setByte("AutoAddContactsToServer", IsDlgButtonChecked(hWndDlg, IDC_AUTO_ADD_CONTACTS_TO_SERVER));
|