]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
operations on NULL are invalid
authorAlan T. DeKok <aland@freeradius.org>
Thu, 4 Jan 2024 22:54:52 +0000 (17:54 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 5 Jan 2024 00:21:28 +0000 (19:21 -0500)
src/lib/util/calc.c

index e721a926907a85c400bf5870feed74521d5ba7e3..b34bdba49052fc4e65ef278e9298d270cddd18fe 100644 (file)
@@ -1899,14 +1899,6 @@ int fr_value_calc_binary_op(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_type_t hint
 
        if ((hint != FR_TYPE_NULL) && !fr_type_is_leaf(hint)) return invalid_type(hint);
 
-       /*
-        *      Any operation on NULL types is itself a NULL type.
-        */
-       if ((a->type == FR_TYPE_NULL) || (b->type == FR_TYPE_NULL)) {
-               fr_value_box_init_null(dst);
-               return 0;
-       }
-
        /*
         *      Casting to structural types should be a parse error,
         *      and not a run-time calculation error.
@@ -1953,7 +1945,6 @@ int fr_value_calc_binary_op(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_type_t hint
                break;
        }
 
-
        fr_value_box_init_null(&one);
        fr_value_box_init_null(&two);