From: Alan T. DeKok Date: Mon, 29 Nov 2021 13:50:53 +0000 (-0500) Subject: date / time_delta are _signed_ integers X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba61872dffa6c9c65c9a9d88df1e415fa1c531af;p=thirdparty%2Ffreeradius-server.git date / time_delta are _signed_ integers --- diff --git a/src/lib/unlang/xlat_builtin.c b/src/lib/unlang/xlat_builtin.c index 16ae347f31c..8c01bcc4d2b 100644 --- a/src/lib/unlang/xlat_builtin.c +++ b/src/lib/unlang/xlat_builtin.c @@ -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;