regex/mlx5: fix size of setup constants
authorMichael Baum <michaelba@nvidia.com>
Thu, 1 Jul 2021 06:39:13 +0000 (09:39 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 22 Jul 2021 12:47:10 +0000 (14:47 +0200)
commit423719a3677cc18d742264315c8451a931ade8e5
treedfcd5a25c9509240fda81daffff17dfee8eea21e
parent33a7493c8df8cd7dc72df31b503e439810f34042
regex/mlx5: fix size of setup constants

The constant representing the size of the metadata is defined as an
unsigned int variable with 32-bit.
Similarly the constant representing the maximal output is also defined
as an unsigned int variable with 32-bit.

There is potentially overflowing expression when those constants are
evaluated using 32-bit arithmetic, and then used in a context that
expects an expression of type size_t that might be 64-bit.

Change the size of the above constants to size_t.

Fixes: 30d604bb1504 ("regex/mlx5: fix type of setup constants")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/regex/mlx5/mlx5_regex_fastpath.c