From: Alan T. DeKok Date: Thu, 4 Jan 2024 22:54:52 +0000 (-0500) Subject: operations on NULL are invalid X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a2406371c52aa9d753dce7835edd9b1bc2a6229;p=thirdparty%2Ffreeradius-server.git operations on NULL are invalid --- diff --git a/src/lib/util/calc.c b/src/lib/util/calc.c index e721a926907..b34bdba4905 100644 --- a/src/lib/util/calc.c +++ b/src/lib/util/calc.c @@ -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);