From 470f6a679dc84e27a7fa5e8c2690b93359fe899e Mon Sep 17 00:00:00 2001 From: WillyJL Date: Mon, 22 Sep 2025 20:08:29 +0200 Subject: [PATCH] CLI: Fix crash with unexpected plugin files (#4243) --- lib/toolbox/cli/cli_registry.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/toolbox/cli/cli_registry.c b/lib/toolbox/cli/cli_registry.c index 91f7c4046..45661ee90 100644 --- a/lib/toolbox/cli/cli_registry.c +++ b/lib/toolbox/cli/cli_registry.c @@ -136,9 +136,9 @@ void cli_registry_reload_external_commands( FURI_LOG_T(TAG, "Plugin: %s", plugin_filename); furi_string_set_str(plugin_name, plugin_filename); - furi_check(furi_string_end_with_str(plugin_name, ".fal")); + if(!furi_string_end_with_str(plugin_name, ".fal")) continue; furi_string_replace_all_str(plugin_name, ".fal", ""); - furi_check(furi_string_start_with_str(plugin_name, config->fal_prefix)); + if(!furi_string_start_with_str(plugin_name, config->fal_prefix)) continue; furi_string_replace_at(plugin_name, 0, strlen(config->fal_prefix), ""); CliRegistryCommand command = {