From 7215aacd5ed629a84e21a54ac8d007366b428800 Mon Sep 17 00:00:00 2001 From: "jabber.developer2" Date: Tue, 31 Mar 2026 19:52:25 +0300 Subject: [PATCH] upstream: cleanup: add a defensive check in cmd_process_input() (f74501e97) --- src/command/cmd_funcs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index c1cc5763..f6e8624e 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -210,6 +210,9 @@ cmd_process_input(ProfWin* window, char* inp) if (inp[0] == '/') { auto_char char* inp_cpy = strdup(inp); char* command = strtok(inp_cpy, " "); + if (!command) { + return TRUE; + } char* question_mark = strchr(command, '?'); if (question_mark) { *question_mark = '\0';