From 53e568efe6f2a9e121ac6cf305e5fa9a84137c1a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 3 Jan 2013 22:11:27 +0000 Subject: - 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 --- plugins/YAMN/src/proto/pop3/pop3comm.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'plugins/YAMN/src/proto/pop3/pop3comm.cpp') 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); - } } } -- cgit v1.2.3