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:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user