Skip to content

Commit

Permalink
dwarf: fixup pointer cast
Browse files Browse the repository at this point in the history
  • Loading branch information
kcbanner committed Jun 14, 2023
1 parent 5929038 commit 1de325f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/std/dwarf.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1862,11 +1862,11 @@ pub const ExceptionFrameHeader = struct {
.data_rel_base = eh_frame_hdr_ptr,
}, builtin.cpu.arch.endian()) orelse return badDwarf();

const fde_ptr = try readEhPointer(reader, self.table_enc, @sizeOf(usize), .{
const fde_ptr = math.cast(usize, try readEhPointer(reader, self.table_enc, @sizeOf(usize), .{
.pc_rel_base = @ptrToInt(&self.entries[stream.pos]),
.follow_indirect = true,
.data_rel_base = eh_frame_hdr_ptr,
}, builtin.cpu.arch.endian()) orelse return badDwarf();
}, builtin.cpu.arch.endian()) orelse return badDwarf()) orelse return badDwarf();

// TODO: Should this also do isValidMemory(fde_ptr) + 11 (worst case header size)?

Expand Down

0 comments on commit 1de325f

Please sign in to comment.