grim/purple-spasm
Clone
Summary
Browse
Changes
Graph
fix crash when disconnecting a spasm account but leaving the chat window open (PIDGIN-17578)
2022-02-07, ivanhoe
97c738eda658
Parents
650b6a1d6912
Children
e89e21302de6
fix crash when disconnecting a spasm account but leaving the chat window open (PIDGIN-17578)
Testing Done:
Did the steps from the issue description while running in valgrind. No crash and no invalid read.
Bugs closed: PIDGIN-17578
Reviewed at https://reviews.imfreedom.org/r/1243/
1 files changed, 5 insertions(+), 0 deletions(-)
+5
-0
src/spasm-chat.c
--- a/src/spasm-chat.c Sat Aug 07 01:46:52 2021 -0500
+++ b/src/spasm-chat.c Mon Feb 07 23:48:29 2022 -0600
@@ -489,6 +489,11 @@
return;
}
+ if(purple_account_is_disconnected(spasm_account_get_account(chat->sa))) {
+ g_free(buffer);
+ return;
+ }
+
spasm_chat_service_parse(chat, buffer);
g_free(buffer);