Skip to content

ZeroizeOnDrop for Vec only wipes the length, not the capacity #1191

@CodesInChaos

Description

@CodesInChaos

Using Zeroize to wipe a Vec wipes the full capacity. But ZeroizeOnDrop only calls drop for valid items, i.e. up to length. The remainder will remain intact. The documentation should call out that pitfall.

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