mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 17:06:21 +00:00
Prevent segfault in sv_ev_incoming_message()
Regards https://github.com/profanity-im/profanity/issues/1488
Actually I would have loved to see the stanza that caused the segfault
since I'm not entirely sure whether this actually means that we do
something wrong earlier on.
Right now I don't know why the to_jid should be empty.
Let's prevent the segfault for now and see whether we get further
bugreports later.
Segfaulting issue got introduced with dd566d8d56.
This commit is contained in:
@@ -600,7 +600,9 @@ sv_ev_incoming_message(ProfMessage* message)
|
||||
if (message->is_mam) {
|
||||
char* mybarejid = connection_get_barejid();
|
||||
if (g_strcmp0(mybarejid, message->from_jid->barejid) == 0) {
|
||||
looking_for_jid = message->to_jid->barejid;
|
||||
if (message->to_jid) {
|
||||
looking_for_jid = message->to_jid->barejid;
|
||||
}
|
||||
}
|
||||
free(mybarejid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user