diff options
-rw-r--r-- | protocols/Skype/src/skype_database.cpp | 2 | ||||
-rw-r--r-- | protocols/Skype/src/skype_events.cpp | 1 | ||||
-rw-r--r-- | protocols/Skype/src/skype_proto.cpp | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/protocols/Skype/src/skype_database.cpp b/protocols/Skype/src/skype_database.cpp index 258b629781..5361ada67d 100644 --- a/protocols/Skype/src/skype_database.cpp +++ b/protocols/Skype/src/skype_database.cpp @@ -21,7 +21,7 @@ bool CSkypeProto::IsMessageInDB(HANDLE hContact, DWORD timestamp, const char* gu int sendFlag = dbei.flags & DBEF_SENT;
if (dbei.eventType == EVENTTYPE_MESSAGE && sendFlag == flag)
{
- if (::memcmp(&dbei.pBlob[dbei.cbBlob], guid, 32) == 0)
+ if (::memcmp(&dbei.pBlob[dbei.cbBlob - 32], guid, 32) == 0)
{
::mir_free(dbei.pBlob);
result = true;
diff --git a/protocols/Skype/src/skype_events.cpp b/protocols/Skype/src/skype_events.cpp index 7a79b782a5..ebee196ebd 100644 --- a/protocols/Skype/src/skype_events.cpp +++ b/protocols/Skype/src/skype_events.cpp @@ -56,6 +56,7 @@ int CSkypeProto::OnMessagePreCreate(WPARAM, LPARAM lParam) {
evt->dbei->pBlob = (PBYTE)::mir_realloc(evt->dbei->pBlob, evt->dbei->cbBlob + guid.size());
::memcpy((char *)&evt->dbei->pBlob[evt->dbei->cbBlob], guid.data(), guid.size());
+ evt->dbei->cbBlob += 32;
}
return 1;
diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp index 2412bc5fd0..ddf36cedb7 100644 --- a/protocols/Skype/src/skype_proto.cpp +++ b/protocols/Skype/src/skype_proto.cpp @@ -293,6 +293,7 @@ int __cdecl CSkypeProto::RecvMsg( HANDLE hContact, PROTORECVEVENT* pre) char *guid = (char *)pre->lParam;
dbei.pBlob = (PBYTE)::mir_realloc(dbei.pBlob, dbei.cbBlob + 32);
::memcpy((char *)&dbei.pBlob[dbei.cbBlob], guid, 32);
+ dbei.cbBlob += 32;
if (pre->flags & PREF_CREATEREAD)
dbei.flags |= DBEF_READ;
|