diff options
author | George Hazan <george.hazan@gmail.com> | 2013-01-03 22:11:27 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-01-03 22:11:27 +0000 |
commit | 53e568efe6f2a9e121ac6cf305e5fa9a84137c1a (patch) | |
tree | 60185775025f8fe3a7ed8f1f78b041c5db5770c1 /plugins/YAMN/src/proto | |
parent | b06a96420250b0a6b8de0a3c463e4599ba16e522 (diff) |
- fix for the buffer overrun in YAMN's mime parser
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@2948 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/YAMN/src/proto')
-rw-r--r-- | plugins/YAMN/src/proto/netlib.cpp | 2 | ||||
-rw-r--r-- | plugins/YAMN/src/proto/pop3/pop3.cpp | 2 | ||||
-rw-r--r-- | plugins/YAMN/src/proto/pop3/pop3comm.cpp | 13 |
3 files changed, 8 insertions, 9 deletions
diff --git a/plugins/YAMN/src/proto/netlib.cpp b/plugins/YAMN/src/proto/netlib.cpp index b7c1864ffa..652715d771 100644 --- a/plugins/YAMN/src/proto/netlib.cpp +++ b/plugins/YAMN/src/proto/netlib.cpp @@ -62,7 +62,7 @@ HANDLE RegisterNLClient(const char *name) }
//Move connection to SSL
-void CNLClient::SSLify() throw(DWORD){
+void CNLClient::SSLify() throw(DWORD) {
#ifdef DEBUG_COMM
SSL_DebugLog("Staring SSL...");
#endif
diff --git a/plugins/YAMN/src/proto/pop3/pop3.cpp b/plugins/YAMN/src/proto/pop3/pop3.cpp index 05e85d7156..76c3e9645c 100644 --- a/plugins/YAMN/src/proto/pop3/pop3.cpp +++ b/plugins/YAMN/src/proto/pop3/pop3.cpp @@ -77,7 +77,7 @@ char *CPop3Client::Connect(const char* servername,const int port,BOOL UseSSL, BO NetClient->Send("STLS\r\n"); free(temp); temp=RecvRest(NetClient->Recv(),POP3_SEARCHACK); - if (AckFlag==POP3_FOK){ // Ok, we are going to tls + if (AckFlag==POP3_FOK) { // Ok, we are going to tls try { NetClient->SSLify(); } catch (...) { diff --git a/plugins/YAMN/src/proto/pop3/pop3comm.cpp b/plugins/YAMN/src/proto/pop3/pop3comm.cpp index 98888a1733..2139a93375 100644 --- a/plugins/YAMN/src/proto/pop3/pop3comm.cpp +++ b/plugins/YAMN/src/proto/pop3/pop3comm.cpp @@ -410,7 +410,7 @@ HYAMNMAIL WINAPI CreatePOP3Mail(HACCOUNT Account,DWORD MailDataVersion) return (HYAMNMAIL)NewMail;
}
-static void SetContactStatus(HACCOUNT account, int status){
+static void SetContactStatus(HACCOUNT account, int status) {
if ((account->hContact) && (account->NewMailN.Flags & YAMN_ACC_CONT)) {
DBWriteContactSettingWord(account->hContact, YAMN_DBMODULE, "Status", status);
}
@@ -708,10 +708,10 @@ DWORD WINAPI SynchroPOP3(struct CheckParam * WhichTemp) DebugLog(SynchroFile,"CheckPOP3:ActualAccountMsgsSO-write enter\n");
#endif
ActualAccount->LastChecked=now;
- for (MsgQueuePtr=(HYAMNMAIL)ActualAccount->Mails;MsgQueuePtr!=NULL;MsgQueuePtr=MsgQueuePtr->Next){
- if (MsgQueuePtr->Flags&YAMN_MSG_BODYREQUESTED){
+ for (MsgQueuePtr=(HYAMNMAIL)ActualAccount->Mails;MsgQueuePtr!=NULL;MsgQueuePtr=MsgQueuePtr->Next) {
+ if (MsgQueuePtr->Flags&YAMN_MSG_BODYREQUESTED) {
HYAMNMAIL NewMsgsPtr=NULL;
- for (NewMsgsPtr=(HYAMNMAIL)NewMails;NewMsgsPtr!=NULL;NewMsgsPtr=NewMsgsPtr->Next){
+ for (NewMsgsPtr=(HYAMNMAIL)NewMails;NewMsgsPtr!=NULL;NewMsgsPtr=NewMsgsPtr->Next) {
if (!strcmp(MsgQueuePtr->ID,NewMsgsPtr->ID)) {
TCHAR accstatus[512];
wsprintf(accstatus,TranslateT("Reading body %s"),NewMsgsPtr->ID);
@@ -769,12 +769,11 @@ DWORD WINAPI SynchroPOP3(struct CheckParam * WhichTemp) DebugLog(SynchroFile,"CheckPOP3:ActualAccountMsgsSO-write done\n");
#endif
MsgsWriteDone(ActualAccount);
- for (MsgQueuePtr=(HYAMNMAIL)ActualAccount->Mails;MsgQueuePtr!=NULL;MsgQueuePtr=MsgQueuePtr->Next){
+ for (MsgQueuePtr=(HYAMNMAIL)ActualAccount->Mails;MsgQueuePtr!=NULL;MsgQueuePtr=MsgQueuePtr->Next) {
if ((MsgQueuePtr->Flags&YAMN_MSG_BODYREQUESTED) && (MsgQueuePtr->Flags&YAMN_MSG_BODYRECEIVED)) {
MsgQueuePtr->Flags&=~YAMN_MSG_BODYREQUESTED;
- if (MsgQueuePtr->MsgWindow){
+ if (MsgQueuePtr->MsgWindow)
SendMessage(MsgQueuePtr->MsgWindow,WM_YAMN_CHANGECONTENT,0,0);
- }
}
}
|