about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2021-03-25 15:27:59 +0100
committerMichael Vetter <jubalh@iodoru.org>2021-03-25 15:27:59 +0100
commit2601fc55716355006a5055bc738f14612a2f4dd9 (patch)
tree326b7da7c070664b7c0c5f01f66c25afebc8cdf4
parentb1bd1ecca8d7cad4423cebead6f2d1f57b6adb33 (diff)
downloadprofani-tty-2601fc55716355006a5055bc738f14612a2f4dd9.tar.gz
message: make _handle_form safer
-rw-r--r--src/xmpp/message.c3
1 files changed, 3 insertions, 0 deletions
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);