summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vlib/buffer_funcs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vlib/buffer_funcs.c b/src/vlib/buffer_funcs.c
index 4e1f2fde22d..80bb30e9f93 100644
--- a/src/vlib/buffer_funcs.c
+++ b/src/vlib/buffer_funcs.c
@@ -261,6 +261,9 @@ vlib_get_frame_queue_elt (vlib_frame_queue_main_t *fqm, u32 index,
vlib_frame_queue_t *fq;
u64 nelts, tail, new_tail;
+ if (index >= vec_len (fqm->vlib_frame_queues))
+ return 0;
+
fq = fqm->vlib_frame_queues[index];
ASSERT (fq);
nelts = fq->nelts;