]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Better assert for boxes which can be truthy
authorNick Porter <nick@portercomputing.co.uk>
Mon, 28 Apr 2025 11:10:17 +0000 (12:10 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Mon, 28 Apr 2025 12:24:51 +0000 (13:24 +0100)
Testing fr_type_is_leaf excludes FR_TYPE_NULL, which is a valid "false"
box.

src/lib/unlang/xlat_expr.c

index d40d2b5b49e8f8c8477526b4bbe852c03040df20..2910adf4737384b3f31230a265a9dcbb33bded23 100644 (file)
@@ -1081,7 +1081,7 @@ static bool xlat_logical_or(xlat_logical_rctx_t *rctx, fr_value_box_list_t const
         *      Loop over the input list.  We CANNOT do groups.
         */
        fr_value_box_list_foreach(in, box) {
-               fr_assert(fr_type_is_leaf(box->type));
+               fr_assert(fr_type_is_leaf(box->type) || fr_type_is_null(box->type));
 
                last = box;