diff options
author | Dmitry Podgorny <pasis.ua@gmail.com> | 2020-06-16 17:52:01 +0300 |
---|---|---|
committer | Dmitry Podgorny <pasis.ua@gmail.com> | 2020-06-16 17:52:01 +0300 |
commit | 409bbd6f2df10d327decbfbbd86be1909e991d58 (patch) | |
tree | c3f04eb4cb5eae00ad98fb1bd60a0962db2098f4 /src | |
parent | 5d5acd65b1ff4417b7f28b1c93af8734b9d0c5d8 (diff) | |
download | profani-tty-409bbd6f2df10d327decbfbbd86be1909e991d58.tar.gz |
Fix possible segfault in xmpp/message.c
Check for pointer to be NULL before dereferencing it.
Diffstat (limited to 'src')
-rw-r--r-- | src/xmpp/message.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xmpp/message.c b/src/xmpp/message.c index b668ce84..d578786e 100644 --- a/src/xmpp/message.c +++ b/src/xmpp/message.c @@ -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; } |