summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/dlg_propsheet.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-16 21:07:53 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-16 21:07:53 +0000
commitbb1a3cdefb28e4468018d50fbb9d16778abe4d6e (patch)
tree90e63c16dbfe06622f8ae61d7eb7d527c49132e3 /plugins/UserInfoEx/src/dlg_propsheet.cpp
parent970946fb23d2555a6d08cd0c5c065d7fd4bee322 (diff)
potential flaw in UserInfoEx (64 bits)
git-svn-id: http://svn.miranda-ng.org/main/trunk@8148 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/dlg_propsheet.cpp')
-rw-r--r--plugins/UserInfoEx/src/dlg_propsheet.cpp31
1 files changed, 9 insertions, 22 deletions
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp
index 44009f8722..f5da4c7488 100644
--- a/plugins/UserInfoEx/src/dlg_propsheet.cpp
+++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp
@@ -203,11 +203,8 @@ public:
**/
int UploadNext()
{
- CHAR str[MAXMODULELABELLENGTH];
while (_pPd && *_pPd && _numProto-- > 0) {
- mir_strncpy(str, (*_pPd)->szModuleName, MAXMODULELABELLENGTH);
- mir_strncat(str, PS_CHANGEINFOEX, MAXMODULELABELLENGTH);
- if (ServiceExists(str) && !Upload()) {
+ if (ProtoServiceExists((*_pPd)->szModuleName, PS_CHANGEINFOEX) && !Upload()) {
_pPd++;
return UPLOAD_CONTINUE;
}
@@ -642,23 +639,14 @@ void DlgContactInfoLoadModule()
ghWindowList = WindowList_Create();
// check whether changing my details via UserInfoEx is basically possible
- {
- PROTOACCOUNT **pAcc;
- int i, nAccCount;
-
- myGlobals.CanChangeDetails = FALSE;
- if (MIRSUCCEEDED(ProtoEnumAccounts(&nAccCount, &pAcc)))
- {
- for (i = 0; (i < nAccCount) && !myGlobals.CanChangeDetails; i++)
- {
- if (IsProtoAccountEnabled(pAcc[i]))
- {
- // update my contact information on icq server
- myGlobals.CanChangeDetails = MIREXISTS(CallProtoService(pAcc[i]->szModuleName, PS_CHANGEINFOEX, NULL, NULL));
- }
- }
- }
- }
+ myGlobals.CanChangeDetails = FALSE;
+
+ PROTOACCOUNT **pAcc;
+ int nAccCount;
+ if (MIRSUCCEEDED(ProtoEnumAccounts(&nAccCount, &pAcc)))
+ for (int i = 0; (i < nAccCount) && !myGlobals.CanChangeDetails; i++)
+ if (IsProtoAccountEnabled(pAcc[i])) // update my contact information on icq server
+ myGlobals.CanChangeDetails = MIREXISTS(CallProtoService(pAcc[i]->szModuleName, PS_CHANGEINFOEX, NULL, NULL));
}
static void ResetUpdateInfo(LPPS pPs)
@@ -1682,4 +1670,3 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
}
return FALSE;
}
-