From 20e1f16b1fdfeaa8c70a73c995059c8134e7f631 Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Tue, 6 Jul 2021 10:21:00 +0200 Subject: [PATCH] Fix segfault in /blocked with no args Fix https://github.com/profanity-im/profanity/issues/1575 --- src/command/cmd_funcs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 88ab9712..96b541b8 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -3049,7 +3049,7 @@ cmd_blocked(ProfWin* window, const char* const command, gchar** args) return TRUE; } - if (strncmp(args[0], "report-", 7) == 0) { + if (args[0] && strncmp(args[0], "report-", 7) == 0) { char* jid = NULL; char* msg = NULL; guint argn = g_strv_length(args);