]> git.ipfire.org Git - thirdparty/nftables.git/commit
evaluate: prevent assert when evaluating very large shift values
authorFlorian Westphal <fw@strlen.de>
Fri, 1 Dec 2023 13:16:14 +0000 (14:16 +0100)
committerFlorian Westphal <fw@strlen.de>
Sun, 3 Dec 2023 11:33:16 +0000 (12:33 +0100)
commit26723202e600604ab7cf48915507cfcb7a313620
tree2bd8e652f6be46b3b50b8a1c895449e8f71434ee
parentc9c2f54c6fb8f9303372202eab5b3e00088c7577
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>
src/evaluate.c
tests/shell/testcases/bogons/nft-f/huge_shift_assert [new file with mode: 0644]