Skip to content

False Positive: CPP UninitializedLocal #42

Open
@bdrodes

Description

@bdrodes
#include <iostream>
using namespace std;
class Test{
    static void printMsg(){
        cout << "Hello World!";
    }
};

int main(){
    Test *t;
    t->printMsg();
}

The t->printMsg() appears to be invalid, but in C++ a static method can be accessed in this manner. Alter the UninitializedLocal.ql query to filter calls to static methods.

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