We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8541119 commit 7c37c55Copy full SHA for 7c37c55
src/link/MachO.zig
@@ -2475,7 +2475,7 @@ fn writeThunkWorker(self: *MachO, thunk: Thunk) void {
2475
defer tracy.end();
2476
const doWork = struct {
2477
fn doWork(th: Thunk, buffer: []u8, macho_file: *MachO) !void {
2478
- const off = th.value;
+ const off = math.cast(usize, th.value) orelse return error.Overflow;
2479
const size = th.size();
2480
var stream = std.io.fixedBufferStream(buffer[off..][0..size]);
2481
try th.write(macho_file, stream.writer());
0 commit comments