Skip to content

realloc on buffer will cause crash #5

@jurgen-kluft

Description

@jurgen-kluft

out = realloc(out, (max *= 2));

A realloc is mostly a free -> copy -> malloc, so the incoming buffer pointer will be freed, causing a double free at the caller site.

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