aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2021-11-19 11:40:08 +0100
committerDamjan Marion <dmarion@me.com>2021-11-22 10:07:08 +0000
commit70f14ab4875ee078dafe0a038d423983017ec56f (patch)
treeb2a9b79d8aa49dbc3364b2c3fdd7e4cba6a63a19 /src/plugins
parent563ec99fa371c473da711483d25517052e9867b9 (diff)
snort: fix coverity warning
Add a cast to avoid coverity warning about potential integer underflow. Type: fix Fixes: 839b1473e9 Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: Iae913e51c1e25aaeca6ce70438451c640d347383
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/snort/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/snort/main.c b/src/plugins/snort/main.c
index 89ffa88235a..d05b6310891 100644
--- a/src/plugins/snort/main.c
+++ b/src/plugins/snort/main.c
@@ -298,8 +298,8 @@ snort_instance_create (vlib_main_t *vm, char *name, u8 log2_queue_sz,
/* enq and deq head pointer */
qpair_mem_sz += 2 * round_pow2 (sizeof (u32), align);
- size =
- round_pow2 (tm->n_vlib_mains * qpair_mem_sz, clib_mem_get_page_size ());
+ size = round_pow2 ((uword) tm->n_vlib_mains * qpair_mem_sz,
+ clib_mem_get_page_size ());
fd = clib_mem_vm_create_fd (CLIB_MEM_PAGE_SZ_DEFAULT, "snort instance %s",
name);