Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/main/seq.c
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,9 @@ attribute_hidden SEXP do_rep(SEXP call, SEXP op, SEXP args, SEXP rho)
len = lx * it * each;
} else { // nt != 1
if(nt != (double) lx * each)
errorcall(call, _("invalid '%s' argument"), "times");
errorcall(call,_("invalid '%s' argument: length of time = %d, expected = %d from (length of x = %d , each = %d) "),"times",nt,(int)((double) lx * each),(int) lx , (int) each );
Copy link

@aitap aitap Aug 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least some of the variables being cast to (int) are of type R_xlen_t. Could they hold a number exceeding INT_MAX?



if (TYPEOF(times) == REALSXP)
for(i = 0; i < nt; i++) {
double rt = REAL(times)[i];
Expand Down
Loading