mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-28 22:16:22 +00:00
mam: check if we get 'first' stanza before usage
Fix https://github.com/profanity-im/profanity/issues/1868
This commit is contained in:
@@ -2738,6 +2738,7 @@ _mam_rsm_id_handler(xmpp_stanza_t* const stanza, void* const userdata)
|
|||||||
|
|
||||||
auto_char char* firstid = NULL;
|
auto_char char* firstid = NULL;
|
||||||
xmpp_stanza_t* first = xmpp_stanza_get_child_by_name(set, STANZA_NAME_FIRST);
|
xmpp_stanza_t* first = xmpp_stanza_get_child_by_name(set, STANZA_NAME_FIRST);
|
||||||
|
if (first) {
|
||||||
firstid = xmpp_stanza_get_text(first);
|
firstid = xmpp_stanza_get_text(first);
|
||||||
|
|
||||||
// 4.3.2. send same stanza with set,max stanza
|
// 4.3.2. send same stanza with set,max stanza
|
||||||
@@ -2764,6 +2765,7 @@ _mam_rsm_id_handler(xmpp_stanza_t* const stanza, void* const userdata)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user