Skip to content

Commit

Permalink
Avoid potential integer overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinstratford committed Jul 16, 2024
1 parent 4f41cde commit ee4d753
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/unit/test_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ int test_map_io_aggr_pack(pe_t * pe, cs_t * cs) {

/* Read back the same values after clearing the originals */
memset(map->status, 0, map->nsite*sizeof(char));
memset(map->data, 0, map->nsite*map->ndata*sizeof(double));
memset(map->data, 0, (size_t) map->nsite*map->ndata*sizeof(double));

ifail = map_io_aggr_unpack(map, &buf);
assert(ifail == 0);
Expand Down

0 comments on commit ee4d753

Please sign in to comment.