Skip to content

Reference binding to null pointer @ Binary::data() #1248

Description

@prigluchenie

Default constructed Binary makes UB here

return owned() ? &m_data[0] : m_unownedData;

m_data[0] is illegal for empty vector. Using vector::data() member is a proper way.

Clang UB sanitizer reports "Reference binding to null pointer" here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions