Skip to content

[C++] STL allocator doesn't check for multiplication overflow #31076

Description

@asfimport

The MemoryPool-backed STL allocator defined in arrow/stl.h has the following code:

    Status s = pool_->Allocate(n * sizeof(T), &data);

but n * sizeof(T) might silently overflow and lead to an incorrect allocation size.

Reporter: Antoine Pitrou / @pitrou

Note: This issue was originally created as ARROW-15615. Please see the migration documentation for further details.

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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions