mirror of
https://github.com/janet-lang/janet
synced 2025-01-06 22:00:27 +00:00
Add overflow check.
This commit is contained in:
parent
9694aee819
commit
88e60c309c
@ -498,6 +498,7 @@ tail:
|
|||||||
|
|
||||||
case RULE_NTH: {
|
case RULE_NTH: {
|
||||||
uint32_t nth = rule[1];
|
uint32_t nth = rule[1];
|
||||||
|
if (nth > INT32_MAX) nth = INT32_MAX;
|
||||||
uint32_t tag = rule[3];
|
uint32_t tag = rule[3];
|
||||||
int oldmode = s->mode;
|
int oldmode = s->mode;
|
||||||
CapState cs = cap_save(s);
|
CapState cs = cap_save(s);
|
||||||
|
Loading…
Reference in New Issue
Block a user