Skip to content

Commit

Permalink
rtc348928: Fixing issue in opal_pointer_array_get_item: incorrect
Browse files Browse the repository at this point in the history
bounds checking for the element index.

Closes open-mpi#15
  • Loading branch information
avilcheslopez committed Sep 12, 2014
1 parent 3157901 commit 5ae69d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opal/class/opal_pointer_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ static inline void *opal_pointer_array_get_item(opal_pointer_array_t *table,
{
void *p;

if( table->size <= element_index ) {
if( table->size <= element_index || 0 > element_index ) {
return NULL;
}
OPAL_THREAD_LOCK(&(table->lock));
Expand Down

0 comments on commit 5ae69d2

Please sign in to comment.