Skip to content

Hardening checks should detect dereferencing map.end() and set.end() #80212

Open
@davidben

Description

@davidben

One of the most common patterns with map and set types is to call find, check the iterator against end(), and dereference the iterator. If you forget to perform this check, libc++'s hardening mode doesn't seem to catch this and just returns garbage values.

(CC @danakj)

Metadata

Metadata

Assignees

No one assigned

    Labels

    hardeningIssues related to the hardening effortlibc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions