summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-05-25 20:23:58 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-05-25 20:23:58 +0300
commitbcf4329b3535ee0dc5dea708f14dfb9bf4ab4fc4 (patch)
treecdfe29cd0464c44a1e81634a52be66b4217d5586 /src/mir_app
parentb7928747cf0f8e53a01ee4628c58559862a9a689 (diff)
Jabber: fix for possible memory corruption
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/chat_svc.cpp7
-rw-r--r--src/mir_app/src/mir_app.def3
-rw-r--r--src/mir_app/src/mir_app64.def3
3 files changed, 11 insertions, 2 deletions
diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp
index e03d826320..fdc32abcc9 100644
--- a/src/mir_app/src/chat_svc.cpp
+++ b/src/mir_app/src/chat_svc.cpp
@@ -763,6 +763,13 @@ MIR_APP_DLL(int) Chat_SetUserInfo(SESSION_INFO *si, void *pItemData)
return GC_EVENT_ERROR;
}
+MIR_APP_DLL(void) Chat_EmptyHistory(SESSION_INFO *si)
+{
+ mir_cslock lck(csChat);
+ if (g_arSessions.indexOf(si) != -1)
+ si->arEvents.destroy();
+}
+
MIR_APP_DLL(void) Chat_UpdateOptions()
{
for (auto &si : g_arSessions)
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index db1745335c..d0abb0ecb0 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -346,7 +346,7 @@ Chat_DoEventHook @445 NONAME
_stubLogProc@16 @446 NONAME
_stubMessageProc@16 @447 NONAME
_stubNicklistProc@16 @448 NONAME
-Chat_GetTextPixelSize @449 NONAME
+?Chat_GetTextPixelSize@@YGHPB_WPAUHFONT__@@_N@Z @449 NONAME
?NotifyEvent@CSrmmBaseDialog@@IAEHH@Z @450 NONAME
Srmm_GetWindowData @451
?Srmm_FindWindow@@YGPAUHWND__@@I@Z @452 NONAME
@@ -874,3 +874,4 @@ Chat_IsMuted @941 NONAME
Clist_RemoveEvent @989
?Clist_GetEventByMenu@@YGPAUCListEvent@@H@Z @990 NONAME
?Clist_GetEventCount@@YGHXZ @991 NONAME
+?Chat_EmptyHistory@@YGXPAUSESSION_INFO@@@Z @992 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index cfc6f9556e..ce3a55a6fd 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -346,7 +346,7 @@ Chat_DoEventHook @445 NONAME
stubLogProc @446 NONAME
stubMessageProc @447 NONAME
stubNicklistProc @448 NONAME
-Chat_GetTextPixelSize @449 NONAME
+?Chat_GetTextPixelSize@@YAHPEB_WPEAUHFONT__@@_N@Z @449 NONAME
?NotifyEvent@CSrmmBaseDialog@@IEAAHH@Z @450 NONAME
Srmm_GetWindowData @451
?Srmm_FindWindow@@YAPEAUHWND__@@I@Z @452 NONAME
@@ -874,3 +874,4 @@ Chat_IsMuted @941 NONAME
Clist_RemoveEvent @989
?Clist_GetEventByMenu@@YAPEAUCListEvent@@H@Z @990 NONAME
?Clist_GetEventCount@@YAHXZ @991 NONAME
+?Chat_EmptyHistory@@YAXPEAUSESSION_INFO@@@Z @992 NONAME