Skip to content

NullReferenceException when not providing target list #2

@AnubisSec

Description

@AnubisSec

In the line below, the program is doing a check against the "targets" option, which is init to null. This type of comparison can't be done with a variable that is null.

https://github.com/Hackcraft-Labs/SharpShares/blob/9ddfb3bd1af6387daca81c9fd7118df876dd2103/SharpShares/Program.cs#L21C47-L21C47

Just a heads up that this breaks execution flow when not providing a target list. Should do something like if (arguments.targets.Count != null) or whatever else seems appropriate.

P.S, Love the fork!

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