Skip to content

extract_from_envelope() doesn't have validation #176

@artiomn

Description

@artiomn

extract_from_envelope() in https://github.com/KasperskyLab/knp/blob/master/knp/core-library/impl/messaging/message_envelope.cpp#L63-L78 doesn't have validation.

Possible fix:

flatbuffers::Verifier verifier(buffer, size); 
if (!verifier.VerifyBuffer<marshal::MessageEnvelope>()) {
    throw std::runtime_error("Invalid FlatBuffer data");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions