mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
message: make _handle_receipt_received safer
This commit is contained in:
parent
2236242407
commit
099260a4e3
@ -1142,7 +1142,7 @@ _handle_receipt_received(xmpp_stanza_t* const stanza)
|
||||
xmpp_stanza_t* receipt = xmpp_stanza_get_child_by_ns(stanza, STANZA_NS_RECEIPTS);
|
||||
if (receipt) {
|
||||
const char* name = xmpp_stanza_get_name(receipt);
|
||||
if (g_strcmp0(name, "received") != 0) {
|
||||
if ((name == NULL) || (g_strcmp0(name, "received") != 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1157,6 +1157,10 @@ _handle_receipt_received(xmpp_stanza_t* const stanza)
|
||||
}
|
||||
|
||||
Jid* jidp = jid_create(fulljid);
|
||||
if(!jidp) {
|
||||
return;
|
||||
}
|
||||
|
||||
sv_ev_message_receipt(jidp->barejid, id);
|
||||
jid_destroy(jidp);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user