From d4a2d8ab4d4a201fe6d70ff3b37b2fe29bc84bce Mon Sep 17 00:00:00 2001 From: Razvan Crainea Date: Mon, 24 Oct 2016 13:07:40 +0300 Subject: [PATCH] drouting: prevent out-of-bound read fixes Coverity CID 150490 --- modules/drouting/dr_cb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/drouting/dr_cb.c b/modules/drouting/dr_cb.c index 33017b1de35..49863f2bfb5 100644 --- a/modules/drouting/dr_cb.c +++ b/modules/drouting/dr_cb.c @@ -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; }