]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
date / time_delta are _signed_ integers
authorAlan T. DeKok <aland@freeradius.org>
Mon, 29 Nov 2021 13:50:53 +0000 (08:50 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 29 Nov 2021 13:50:53 +0000 (08:50 -0500)
src/lib/unlang/xlat_builtin.c

index 16ae347f31cbb8a6e58d86a3a7f40861d02b7464..8c01bcc4d2b44c35d7c494aa542c64f8c470dede 100644 (file)
@@ -1104,10 +1104,11 @@ static xlat_action_t xlat_func_integer(TALLOC_CTX *ctx, fr_dcursor_t *out,
 
                /*
                 *      FR_TYPE_DATE and FR_TYPE_DELTA need to be cast to
-                *      uin64_t so they're printed in a numeric format.
+                *      in64_t so that they're printed in a numeric format.
                 */
                if ((in_vb->type != FR_TYPE_DATE) && (in_vb->type != FR_TYPE_TIME_DELTA)) break;
-               FALL_THROUGH;
+               if (fr_value_box_cast_in_place(ctx, in_vb, FR_TYPE_INT64, NULL) < 0) goto error;
+               break;
 
        case FR_TYPE_STRING:
                if (fr_value_box_cast_in_place(ctx, in_vb, FR_TYPE_UINT64, NULL) < 0) goto error;