szn

Bug 160 — server/server.zig — loadConfigFile — @intCast(size) from c_long to usize can panic

160. server/server.zig — loadConfigFile — @intCast(size) from c_long to usize can panic

File: src/server/server.zig:1354 Severity: LOW Status: ✅ FIXED — added @as(usize, @intCast(size)) with prior negative check.

const content = try self.allocator.alloc(u8, @intCast(size));

ftell returns c_long (signed). If size is negative and the check is bypassed, @intCast panics.