]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: cli: Missing arg offset for filter data values.
authorAdis Nezirovic <anezirovic@haproxy.com>
Wed, 22 Jan 2020 15:16:48 +0000 (16:16 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 22 Jan 2020 17:09:06 +0000 (18:09 +0100)
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

index e4eca989cb122fa8802435c4662c0a2c2a6f89b0..1b397e59e4f8c4f1f47330e91059ca52c30eb5ad 100644 (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");
        }