Skip to content

Commit 4460e8b

Browse files
authored
Merge pull request #7714 from devreal/opal-progress-unregister-oob
Fix potential out-of-bounds write in opal_progress_unregister
2 parents dbbdb8f + fa1b12a commit 4460e8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

opal/runtime/opal_progress.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,8 +474,8 @@ static int _opal_progress_unregister (opal_progress_callback_t cb, volatile opal
474474
(void) opal_atomic_swap_ptr ((opal_atomic_intptr_t *) (callback_array + i), (intptr_t) callback_array[i+1]);
475475
}
476476

477-
callback_array[*callback_array_len] = fake_cb;
478477
--*callback_array_len;
478+
callback_array[*callback_array_len] = fake_cb;
479479

480480
return OPAL_SUCCESS;
481481
}

0 commit comments

Comments
 (0)