From 56dd354b3c55876c4e693fe5eee919e85b2bad53 Mon Sep 17 00:00:00 2001 From: Adis Nezirovic Date: Wed, 22 Jan 2020 16:16:48 +0100 Subject: [PATCH] BUG/MINOR: cli: Missing arg offset for filter data values. We don't properly check for missing data values for additional filter entries, passing out of bounds index to args[], then passing to strlen. Introduced in commit 1a693fc2: (MEDIUM: cli: Allow multiple filter entries for "show table") --- src/stick_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stick_table.c b/src/stick_table.c index e4eca989cb..1b397e59e4 100644 --- a/src/stick_table.c +++ b/src/stick_table.c @@ -3620,7 +3620,7 @@ static int table_prepare_data_request(struct appctx *appctx, char **args) if (appctx->ctx.table.data_op[i] < 0) return cli_err(appctx, "Require and operator among \"eq\", \"ne\", \"le\", \"ge\", \"lt\", \"gt\"\n"); - if (!*args[5] || strl2llrc(args[5+3*i], strlen(args[5+3*i]), &appctx->ctx.table.value[i]) != 0) + if (!*args[5+3*i] || strl2llrc(args[5+3*i], strlen(args[5+3*i]), &appctx->ctx.table.value[i]) != 0) return cli_err(appctx, "Require a valid integer value to compare against\n"); } -- 2.47.3