From 2601fc55716355006a5055bc738f14612a2f4dd9 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Thu, 25 Mar 2021 15:27:59 +0100 Subject: [PATCH] message: make _handle_form safer --- src/xmpp/message.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/xmpp/message.c b/src/xmpp/message.c index 1f43389e..884d63a1 100644 --- a/src/xmpp/message.c +++ b/src/xmpp/message.c @@ -276,6 +276,9 @@ _handle_form(xmpp_stanza_t* const stanza) } const char* const stanza_from = xmpp_stanza_get_from(stanza); + if (!stanza_from) { + return FALSE; + } DataForm* form = form_create(result); ProfConfWin* confwin = (ProfConfWin*)wins_new_config(stanza_from, form, message_muc_submit_voice_approve, NULL, NULL);