From: Phil Sutter Date: Wed, 8 Oct 2025 21:19:08 +0000 (+0200) Subject: datatype: Fix boolean type on Big Endian X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aec699af2a006b1dd6580abb95910c402e306fa9;p=thirdparty%2Fnftables.git 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 --- diff --git a/src/datatype.c b/src/datatype.c index 956ce2ac..7effeb33 100644 --- a/src/datatype.c +++ b/src/datatype.c @@ -1559,7 +1559,7 @@ static struct error_record *boolean_type_parse(struct parse_ctx *ctx, struct expr **res) { struct error_record *erec; - int num; + uint8_t num; erec = integer_type_parse(ctx, sym, res); if (erec)