action_render_string_actions_template(): Assert that the multi action index is valid
authorFabian Keil <fk@fabiankeil.de>
Sat, 9 Sep 2023 06:17:52 +0000 (08:17 +0200)
committerFabian Keil <fk@fabiankeil.de>
Sat, 9 Sep 2023 09:54:00 +0000 (11:54 +0200)
cgiedit.c

index 2ae42e1..adcc01d 100644 (file)
--- a/cgiedit.c
+++ b/cgiedit.c
@@ -4518,6 +4518,8 @@ static jb_err action_render_string_actions_template(struct map *exports,
        struct list_entry *list;
    };
 
+   assert(type->multi_action_index < ACTION_MULTI_COUNT);
+
    struct action_multi desc[] = {
        { 'y', action->multi_add[type->multi_action_index][0].first },
        { 'n', action->multi_remove[type->multi_action_index][0].first }