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")
This commit is contained in:
Adis Nezirovic 2020-01-22 16:16:48 +01:00 committed by Willy Tarreau
parent 2b64a35184
commit 56dd354b3c
1 changed files with 1 additions and 1 deletions

View File

@ -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");
}