diff options
author | George Hazan <ghazan@miranda.im> | 2017-11-15 12:50:38 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-11-15 12:50:38 +0300 |
commit | f6f193f8d9ef286699be2c2282a9c448f7668842 (patch) | |
tree | eb5ca088d0ce320fc6f78a73c857e5899ab51bf0 /protocols/IcqOscarJ/src/icq_opts.cpp | |
parent | 854f47adb115f3d03d6a64543178e84877acb0b4 (diff) |
fixes #1031 (ICQ password must be of 14 chars most)
Diffstat (limited to 'protocols/IcqOscarJ/src/icq_opts.cpp')
-rw-r--r-- | protocols/IcqOscarJ/src/icq_opts.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/IcqOscarJ/src/icq_opts.cpp b/protocols/IcqOscarJ/src/icq_opts.cpp index 1629b3f7ce..791145180a 100644 --- a/protocols/IcqOscarJ/src/icq_opts.cpp +++ b/protocols/IcqOscarJ/src/icq_opts.cpp @@ -72,11 +72,11 @@ static INT_PTR CALLBACK DlgProcIcqOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP else // keep it empty when no UIN entered
SetDlgItemTextA(hwndDlg, IDC_ICQNUM, "");
- SendDlgItemMessage(hwndDlg, IDC_PASSWORD, EM_LIMITTEXT, PASSWORDMAXLEN - 1, 0);
+ SendDlgItemMessage(hwndDlg, IDC_PASSWORD, EM_LIMITTEXT, 14, 0);
// bit of a security hole here, since it's easy to extract a password from an edit box
- char pszPwd[PASSWORDMAXLEN];
- if (ppro->GetUserStoredPassword(pszPwd, sizeof(pszPwd)))
+ char pszPwd[PASSWORDMAXLEN+1];
+ if (ppro->GetUserStoredPassword(pszPwd))
SetDlgItemTextA(hwndDlg, IDC_PASSWORD, pszPwd);
LoadDBCheckState(ppro, hwndDlg, IDC_SSL, "SecureConnection", DEFAULT_SECURE_CONNECTION);
@@ -296,7 +296,7 @@ static INT_PTR CALLBACK DlgProcIcqPrivacyOpts(HWND hwndDlg, UINT msg, WPARAM wPa static HWND hCpCombo;
struct CPTABLE {
- WORD cpId;
+ int cpId;
char *cpName;
};
@@ -321,7 +321,7 @@ struct CPTABLE cpTable[] = { static BOOL CALLBACK FillCpCombo(LPSTR str)
{
- UINT i, cp = atoi(str);
+ int i, cp = atoi(str);
for (i = 0; cpTable[i].cpName != nullptr && cpTable[i].cpId != cp; i++);
if (cpTable[i].cpName)
ComboBoxAddStringUtf(hCpCombo, cpTable[i].cpName, cpTable[i].cpId);
|