1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Merge pull request #1365 from profanity-im/segfault

Fix possible segfault in xmpp/message.c
This commit is contained in:
Michael Vetter 2020-06-16 14:25:50 +02:00 committed by GitHub
commit cffce4de8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1169,7 +1169,7 @@ _handle_chat(xmpp_stanza_t *const stanza, gboolean is_mam)
{
// ignore if type not chat or absent
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;
}