From: Alan T. DeKok Date: Fri, 27 May 2022 21:43:46 +0000 (-0400) Subject: structural and NULL types are logically false. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=babb96c730d493c8eb5f6bd6f40fc8b8b937fe23;p=thirdparty%2Ffreeradius-server.git structural and NULL types are logically false. --- diff --git a/src/lib/unlang/xlat_expr.c b/src/lib/unlang/xlat_expr.c index 3b84a9cd498..5961e9b3b5e 100644 --- a/src/lib/unlang/xlat_expr.c +++ b/src/lib/unlang/xlat_expr.c @@ -338,6 +338,11 @@ static void cast_to_bool(bool *out, fr_value_box_t const *in) fr_value_box_t box; switch (in->type) { + case FR_TYPE_NULL: + case FR_TYPE_STRUCTURAL: + *out = false; + break; + case FR_TYPE_BOOL: *out = in->vb_bool; break;