Skip to content

Commit 939b195

Browse files
authored
Merge pull request #9033 from bwbarrett/backports/v5.0.x-mtl_ofi_overflow_fix
Fix buffer overflow in get_package_rank
2 parents 9f6b0c8 + fd71fcf commit 939b195

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

opal/mca/common/ofi/common_ofi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ static uint32_t get_package_rank(opal_process_info_t *process_info)
305305
int i;
306306
uint16_t relative_locality, *package_rank_ptr;
307307
uint16_t current_package_rank = 0;
308-
uint16_t package_ranks[process_info->num_local_peers];
308+
uint16_t package_ranks[process_info->num_local_peers + 1];
309309
opal_process_name_t pname;
310310
pmix_status_t rc;
311311
char **peers = NULL;

0 commit comments

Comments
 (0)