From 73f57cc8b0355cabdac4ba69edc88e084ccc0a77 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 3 Feb 2019 13:48:22 +0300 Subject: fixes #1818 (SkypeWeb: invalid data error on audio/video call) --- plugins/Scriver/src/msglog.cpp | 1 + protocols/SkypeWeb/src/skype_db.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp index 11ae269256..bcea9f130e 100644 --- a/plugins/Scriver/src/msglog.cpp +++ b/plugins/Scriver/src/msglog.cpp @@ -116,6 +116,7 @@ EventData* getEventFromDB(CSrmmWindow *dat, MCONTACT hContact, MEVENT hDbEvent) dbei.cbBlob = db_event_getBlobSize(hDbEvent); if (dbei.cbBlob == -1) return nullptr; + dbei.pBlob = (PBYTE)mir_alloc(dbei.cbBlob); db_event_get(hDbEvent, &dbei); if (!DbEventIsShown(dbei)) { diff --git a/protocols/SkypeWeb/src/skype_db.cpp b/protocols/SkypeWeb/src/skype_db.cpp index e627d76423..f26673d8ad 100644 --- a/protocols/SkypeWeb/src/skype_db.cpp +++ b/protocols/SkypeWeb/src/skype_db.cpp @@ -43,7 +43,7 @@ MEVENT CSkypeProto::AddDbEvent(WORD type, MCONTACT hContact, DWORD timestamp, DW if (MEVENT hDbEvent = GetMessageFromDb(uid)) return hDbEvent; - MEVENT ret = AddEventToDb(hContact, type, timestamp, flags, (DWORD)mir_strlen(content), (BYTE*)content); + MEVENT ret = AddEventToDb(hContact, type, timestamp, flags, (DWORD)mir_strlen(content)+1, (BYTE*)content); if (uid && ret) db_event_setId(m_szModuleName, ret, uid); return ret; -- cgit v1.2.3