Skip to content

Commit fa1b12a

Browse files
committed
Fix potential out-of-bounds write in opal_progress_unregister
Signed-off-by: Joseph Schuchart <schuchart@hlrs.de>
1 parent 0dc2325 commit fa1b12a

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)