1
0
mirror of https://github.com/janet-lang/janet synced 2025-01-05 05:10:26 +00:00

Add overflow check.

This commit is contained in:
Calvin Rose 2024-09-12 17:28:53 -05:00
parent 9694aee819
commit 88e60c309c

View File

@ -498,6 +498,7 @@ tail:
case RULE_NTH: {
uint32_t nth = rule[1];
if (nth > INT32_MAX) nth = INT32_MAX;
uint32_t tag = rule[3];
int oldmode = s->mode;
CapState cs = cap_save(s);