Skip to content

depguard panics if pkg is empty string #111

@rittneje

Description

@rittneje

I accidentally messed up the config file, so I had a deny rule with no pkg key. This defaulted to the empty string. Then ultimately it panicked here with "index out of range [-1]".

if ioc[len(ioc)-1] == '$' {

Please add some defensive checks to output a clear error message instead of crashing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions