]> git.feebdaed.xyz Git - 0xmirror/nftables.git/commit
datatype: Fix boolean type on Big Endian
authorPhil Sutter <phil@nwl.cc>
Wed, 8 Oct 2025 21:19:08 +0000 (23:19 +0200)
committerPhil Sutter <phil@nwl.cc>
Thu, 23 Oct 2025 20:48:50 +0000 (22:48 +0200)
commitaec699af2a006b1dd6580abb95910c402e306fa9
tree5f61fdcf59cc552a5c760954cd679ccde56a7631
parentb30ad0c25b7b4a289dd73e8da6fa101b66fbf0d7
datatype: Fix boolean type on Big Endian

Pass a reference to a variable with correct size when creating the
expression, otherwise mpz_import_data() will read only the always zero
upper byte on Big Endian hosts.

Fixes: afb6a8e66a111 ("datatype: clamp boolean value to 0 and 1")
Signed-off-by: Phil Sutter <phil@nwl.cc>
src/datatype.c