From b2a02424ed5eb61d9d904331f7fcfcb752c6e0fc Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 25 Mar 2021 15:38:48 +0100 Subject: [PATCH] message: make _receipt_request_handler safer --- src/xmpp/message.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xmpp/message.c b/src/xmpp/message.c index 1303b38b..bb9d8038 100644 --- a/src/xmpp/message.c +++ b/src/xmpp/message.c @@ -1184,7 +1184,7 @@ _receipt_request_handler(xmpp_stanza_t* const stanza) } const char* receipts_name = xmpp_stanza_get_name(receipts); - if (g_strcmp0(receipts_name, "request") != 0) { + if ((receipts_name == NULL) || (g_strcmp0(receipts_name, "request") != 0)) { return; }