summaryrefslogtreecommitdiff
path: root/plugins/New_GPG/src/main.cpp
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-11-30 18:33:56 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-11-30 18:33:56 +0000
commit4f0e30cdf56fbafdf955bbe8b93930bab9e39bd0 (patch)
treeded36ec10c55fb5d33c8d2e471ec808eeb058a04 /plugins/New_GPG/src/main.cpp
parent237d02ebbabbedfb8b33160ebfb5250bbd491eca (diff)
Fix buf size for Get/Set text, open/save file name
SMS: SIZE_T -> size_t MRA: small code cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@11175 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/New_GPG/src/main.cpp')
-rwxr-xr-xplugins/New_GPG/src/main.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp
index 97ba1eabe9..de39d4a36e 100755
--- a/plugins/New_GPG/src/main.cpp
+++ b/plugins/New_GPG/src/main.cpp
@@ -322,7 +322,7 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR
boost::algorithm::erase_all(out, "\r");
{
char buf[64];
- GetDlgItemTextA(hwndDlg, IDC_ACCOUNT, buf, 63);
+ GetDlgItemTextA(hwndDlg, IDC_ACCOUNT, buf, SIZEOF(buf));
if(!strcmp(buf, Translate("Default")))
{
db_set_s(NULL, szGPGModuleName, "GPGPubKey", out.c_str());
@@ -351,7 +351,7 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR
}
}
TCHAR passwd[64];
- GetDlgItemText(hwndDlg, IDC_KEY_PASSWORD, passwd, 64);
+ GetDlgItemText(hwndDlg, IDC_KEY_PASSWORD, passwd, SIZEOF(passwd));
if(passwd[0])
{
string dbsetting = "szKey_";
@@ -497,7 +497,7 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR
}
{
char buf[64];
- GetDlgItemTextA(hwndDlg, IDC_ACCOUNT, buf, 63);
+ GetDlgItemTextA(hwndDlg, IDC_ACCOUNT, buf, SIZEOF(buf));
if(!strcmp(buf, Translate("Default")))
{
db_unset(NULL, szGPGModuleName, "GPGPubKey");
@@ -625,7 +625,7 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR
}
{
char buf[64];
- GetDlgItemTextA(hwndDlg, IDC_ACCOUNT, buf, 63);
+ GetDlgItemTextA(hwndDlg, IDC_ACCOUNT, buf, SIZEOF(buf));
if(!strcmp(buf, Translate("Default")))
{
db_set_s(NULL, szGPGModuleName, "GPGPubKey", out.c_str());
@@ -650,7 +650,7 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR
case IDC_ACCOUNT:
{
char buf[64];
- GetDlgItemTextA(hwndDlg, IDC_ACCOUNT, buf, 63);
+ GetDlgItemTextA(hwndDlg, IDC_ACCOUNT, buf, SIZEOF(buf));
if(!strcmp(buf, Translate("Default")))
{
string keyinfo = Translate("key ID");
@@ -1002,7 +1002,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
case ID_OK:
{
TCHAR tmp[512];
- GetDlgItemText(hwndDlg, IDC_BIN_PATH, tmp, 512);
+ GetDlgItemText(hwndDlg, IDC_BIN_PATH, tmp, SIZEOF(tmp));
if(tmp[0])
{
char *mir_path = new char [MAX_PATH];
@@ -1052,7 +1052,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
MessageBox(0, TranslateT("Unsupported GnuPG version found, use at you own risk!\nIt is recommended to use GnuPG v1.x.x with this plugin."), TranslateT("Warning"), MB_OK);
}
db_set_ts(NULL, szGPGModuleName, "szGpgBinPath", tmp);
- GetDlgItemText(hwndDlg, IDC_HOME_DIR, tmp, 512);
+ GetDlgItemText(hwndDlg, IDC_HOME_DIR, tmp, SIZEOF(tmp));
while(tmp[_tcslen(tmp)-1] == '\\')
tmp[_tcslen(tmp)-1] = '\0';
if(!tmp[0])
@@ -1080,7 +1080,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
case IDC_GENERATE_RANDOM:
{
TCHAR tmp[512];
- GetDlgItemText(hwndDlg, IDC_BIN_PATH, tmp, 512);
+ GetDlgItemText(hwndDlg, IDC_BIN_PATH, tmp, SIZEOF(tmp));
if(tmp[0])
{
char *mir_path = new char [MAX_PATH];
@@ -1130,7 +1130,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
MessageBox(0, TranslateT("Unsupported GnuPG version found, use at you own risk!\nIt is recommended to use GnuPG v1.x.x with this plugin."), TranslateT("Warning"), MB_OK);
}
db_set_ts(NULL, szGPGModuleName, "szGpgBinPath", tmp);
- GetDlgItemText(hwndDlg, IDC_HOME_DIR, tmp, 512);
+ GetDlgItemText(hwndDlg, IDC_HOME_DIR, tmp, SIZEOF(tmp));
while(tmp[_tcslen(tmp)-1] == '\\')
tmp[_tcslen(tmp)-1] = '\0';
if(!tmp[0])