]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
cast RHS, as the types might be different
authorAlan T. DeKok <aland@freeradius.org>
Sat, 27 Nov 2021 14:06:47 +0000 (09:06 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 27 Nov 2021 16:36:32 +0000 (11:36 -0500)
src/lib/util/calc.c

index e8fa1ba9e088400af473a1c1b1ac5e6734274293..f97780e07583eb183a28f3e4901710e0c6df4dd6 100644 (file)
@@ -1294,7 +1294,7 @@ int fr_value_calc_assignment_op(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_token_t
        case T_OP_EQ:
        case T_OP_SET:
                fr_value_box_clear_value(dst);
-               fr_value_box_copy(ctx, dst, src);
+               fr_value_box_cast(ctx, dst, dst->type, dst->enumv, src); /* cast, as the RHS might not (yet) be the same! */
                rcode = 0;
                break;