mirror of
https://github.com/profanity-im/profanity.git
synced 2024-06-23 21:45:30 +00:00
Fix possible segfault in xmpp/message.c
Check for pointer to be NULL before dereferencing it.
This commit is contained in:
parent
5d5acd65b1
commit
409bbd6f2d
|
@ -1169,7 +1169,7 @@ _handle_chat(xmpp_stanza_t *const stanza, gboolean is_mam)
|
||||||
{
|
{
|
||||||
// ignore if type not chat or absent
|
// ignore if type not chat or absent
|
||||||
const char *type = xmpp_stanza_get_type(stanza);
|
const char *type = xmpp_stanza_get_type(stanza);
|
||||||
if (!(g_strcmp0(type, "chat") == 0 || type == NULL)) {
|
if (type == NULL || g_strcmp0(type, STANZA_TYPE_CHAT) != 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user