Skip to content

[Bug] Unsafe table indexing in load_actions — invalid commands crash Neovim #40

Description

@PyDevC

File: lua/model_cmp/commands.lua:109

Introduction: actions[args[1]][args[2]]() assumes both args[1] and args[2] exist and are valid keys. Any invalid :ModelCmp command crashes with a hard Lua error.

Detailed Description: No input validation exists. :ModelCmp nonexistent, :ModelCmp virtualtext nonexistent, or :ModelCmp (no args) all produce uncatchable errors.

Reproduction:

:ModelCmp nonexistent        " crashes
:ModelCmp virtualtext foo    " crashes
:ModelCmp                    " crashes

System detail: All systems.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    AI genIssue was generated by AIbugSomething isn't workingmaintainer triagedmaintainer has triaged the issue

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions