mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
bounds checking
This commit is contained in:
@@ -5906,7 +5906,7 @@ pub const Macro = struct {
|
||||
var nextArg = writer.eatArg() orelse return false;
|
||||
if (js.JSValueIsArray(writer.ctx, nextArg.asRef())) {
|
||||
const extras = nextArg.getLengthOfArray(JavaScript.VirtualMachine.vm.global);
|
||||
count += @truncate(u16, extras) - 1;
|
||||
count += std.math.max(@truncate(u16, extras), 1) - 1;
|
||||
items.ensureUnusedCapacity(extras) catch unreachable;
|
||||
items.expandToCapacity();
|
||||
var new_writer = writer.*;
|
||||
|
||||
Reference in New Issue
Block a user