summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2023-12-01 14:16:14 +0100
committerFlorian Westphal <fw@strlen.de>2023-12-03 12:33:16 +0100
commit26723202e600604ab7cf48915507cfcb7a313620 (patch)
tree2bd8e652f6be46b3b50b8a1c895449e8f71434ee /tests
parentc9c2f54c6fb8f9303372202eab5b3e00088c7577 (diff)
evaluate: prevent assert when evaluating very large shift values
Error out instead of 'nft: gmputil.c:67: mpz_get_uint32: Assertion `cnt <= 1' failed.'. Fixes: edecd58755a8 ("evaluate: support shifts larger than the width of the left operand") Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests')
-rw-r--r--tests/shell/testcases/bogons/nft-f/huge_shift_assert5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/shell/testcases/bogons/nft-f/huge_shift_assert b/tests/shell/testcases/bogons/nft-f/huge_shift_assert
new file mode 100644
index 00000000..7599f850
--- /dev/null
+++ b/tests/shell/testcases/bogons/nft-f/huge_shift_assert
@@ -0,0 +1,5 @@
+table ip t {
+ chain c {
+ counter name meta mark >> 88888888888888888888
+ }
+}