Skip to content

Commit

Permalink
drouting: prevent out-of-bound read
Browse files Browse the repository at this point in the history
fixes Coverity CID 150490
  • Loading branch information
razvancrainea committed Oct 24, 2016
1 parent 76fb8a2 commit d4a2d8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/drouting/dr_cb.c
Expand Up @@ -117,7 +117,7 @@ int register_dr_cb(enum drcb_types type, dr_cb f, void *param,
goto error;
}
cb_sort_index = (long int)param;
if(cb_sort_index > N_MAX_SORT_CBS) {
if(cb_sort_index >= N_MAX_SORT_CBS) {
LM_ERR("Sort cbs array not large enough to accomodate cb at dr\n");
goto error;
}
Expand Down

0 comments on commit d4a2d8a

Please sign in to comment.