From: Yogesh Jangra Date: Thu, 21 Oct 2021 03:23:32 +0000 (-0400) Subject: pipeline: fix instruction label check X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=commitdiff_plain;h=55095ccb7fdda113186e3191760a5cf0b0e8d28d pipeline: fix instruction label check The instruction_data array was incorrectly indexed, which resulted in the array index getting out of bounds and sometimes segfault. Fixes: a1711f (“pipeline: add SWX Rx and extract instructions“) Cc: stable@dpdk.org Signed-off-by: Yogesh Jangra Acked-by: Cristian Dumitrescu --- diff --git a/lib/pipeline/rte_swx_pipeline.c b/lib/pipeline/rte_swx_pipeline.c index 1cd09a4b44..055056098d 100644 --- a/lib/pipeline/rte_swx_pipeline.c +++ b/lib/pipeline/rte_swx_pipeline.c @@ -5983,7 +5983,7 @@ instr_label_check(struct instruction_data *instruction_data, continue; for (j = i + 1; j < n_instructions; j++) - CHECK(strcmp(label, data[j].label), EINVAL); + CHECK(strcmp(label, instruction_data[j].label), EINVAL); } /* Get users for each instruction label. */