Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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