authorgravatar for carl@astholm.seCarl Åstholm <carl@astholm.se> 2024-01-07 21:39:22+01:00
committergravatar for carl@astholm.seCarl Åstholm <carl@astholm.se> 2024-01-07 21:46:52+01:00
log01b48e938198a206b95ed06f3a7e530e859c1cbc
tree7d931f5f08e2db834fec364a01774c89b8cdbcc1
parent92458094c8f8294d7bb50d28b09dd2c02b03a25e

InternPool: Fix rare buffer overflow when initializing aggregate with sentinel


1 files changed, 1 insertions(+), 1 deletions(-)

src/InternPool.zig+1-1
......@@ -5315,7 +5315,7 @@ pub fn get(ip: *InternPool, gpa: Allocator, key: Key) Allocator.Error!Index {
53155315
53165316 try ip.extra.ensureUnusedCapacity(
53175317 gpa,
5318 @typeInfo(Tag.Aggregate).Struct.fields.len + @as(usize, @intCast(len_including_sentinel)),
5318 @typeInfo(Tag.Aggregate).Struct.fields.len + @as(usize, @intCast(len_including_sentinel + 1)),
53195319 );
53205320 ip.items.appendAssumeCapacity(.{
53215321 .tag = .aggregate,