1
0
mirror of https://github.com/janet-lang/janet synced 2026-05-21 21:02:14 +00:00

Add another bounds check for updating labels. Related to #1700

This commit is contained in:
Calvin Rose
2026-01-31 13:20:45 -06:00
parent 8f8382eead
commit 8481da18d0
+1 -1
View File
@@ -688,7 +688,7 @@ static JanetSlot janetc_if(JanetFopts opts, int32_t argn, const Janet *argv) {
labeld = janet_v_count(c->buffer);
if (labeljr < labeld) {
c->buffer[labeljr] |= (labelr - labeljr) << 16;
if (!tail) c->buffer[labeljd] |= (labeld - labeljd) << 8;
if (!tail && labeljd < labeld) c->buffer[labeljd] |= (labeld - labeljd) << 8;
}
if (tail) target.flags |= JANET_SLOT_RETURNED;