Skip to content

The call to mem_alloc in cc_array_subarray() is unsafe #160

@kbridge

Description

@kbridge

if (!(sub_ar->buffer = ar->mem_alloc(ar->capacity * sizeof(void*)))) {

Because ar->capacity * sizeof(void*) can overflow. Should use ar->mem_calloc.

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