Skip to content

Conversation

@bwbarrett
Copy link
Member

Fix an allocation bug that could occur on non-LP64 platforms.
match_edges_out is an array of integers representing the
edges of the graph (where vertices are ints), with two ints
for every edge. The previous code allocated enough space
for num_dges * sizeof(int*), which happens to be the same
as num_edges * 2 * sizeof(int) on LP64 platforms, but would
be wrong on all other platforms.

Fixes: CID 1417754

Signed-off-by: Brian Barrett [email protected]

Fix an allocation bug that could occur on non-LP64 platforms.
match_edges_out is an array of integers representing the
edges of the graph (where vertices are ints), with two ints
for every edge.  The previous code allocated enough space
for num_dges * sizeof(int*), which happens to be the same
as num_edges * 2 * sizeof(int) on LP64 platforms, but would
be wrong on all other platforms.

Fixes: CID 1417754

Signed-off-by: Brian Barrett <[email protected]>
@bwbarrett
Copy link
Member Author

@jsquyres, not sure if usNIC supports 32-bit builds, but if so, you probably want to back-port this change to the release branches.

@jsquyres jsquyres merged commit 2e5e7b8 into open-mpi:master Sep 18, 2017
@bwbarrett bwbarrett deleted the graph-coverity branch May 8, 2020 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants