Skip to content

Commit 199a122

Browse files
committed
%time.next() needs > 0 input (CID #1681377)
1 parent cd043f0 commit 199a122

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib/unlang/xlat_builtin.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,6 +1502,10 @@ static xlat_action_t xlat_func_next_time(TALLOC_CTX *ctx, fr_dcursor_t *out,
15021502
REDEBUG("<int> must be followed by time period (h|d|w|m|y)");
15031503
return XLAT_ACTION_FAIL;
15041504
}
1505+
if (num == 0) {
1506+
REDEBUG("<int> must be greater than zero");
1507+
return XLAT_ACTION_FAIL;
1508+
}
15051509

15061510
if (p == q) {
15071511
num = 1;

0 commit comments

Comments
 (0)