]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
structural and NULL types are logically false.
authorAlan T. DeKok <aland@freeradius.org>
Fri, 27 May 2022 21:43:46 +0000 (17:43 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 3 Jun 2022 11:15:47 +0000 (07:15 -0400)
src/lib/unlang/xlat_expr.c

index 3b84a9cd498e7ae90d63021af63c30b9380e5e4d..5961e9b3b5e5675da1c321ee205e0be4d3b66747 100644 (file)
@@ -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;