| author | |
| committer | |
| log | e349bb2b66ec25cfa57860fdf690333704eb7c96 |
| tree | 1871eaddd466d647db42ddc9fd03f3086009e0d5 |
| parent | b294103c7ed9892c54800b00d054619177d35839 |
2 files changed, 2 insertions(+), 2 deletions(-)
src/link/Elf/Object.zig+1-1| ... | @@ -68,7 +68,7 @@ pub fn parse(self: *Object, elf_file: *Elf) !void { | ... | @@ -68,7 +68,7 @@ pub fn parse(self: *Object, elf_file: *Elf) !void { |
| 68 | const gpa = elf_file.base.allocator; | 68 | const gpa = elf_file.base.allocator; |
| 69 | 69 | ||
| 70 | if (self.data.len < self.header.?.e_shoff or | 70 | if (self.data.len < self.header.?.e_shoff or |
| 71 | self.data.len < self.header.?.e_shoff + self.header.?.e_shnum * @sizeOf(elf.Elf64_Shdr)) | 71 | self.data.len < self.header.?.e_shoff + @as(u64, @intCast(self.header.?.e_shnum)) * @sizeOf(elf.Elf64_Shdr)) |
| 72 | { | 72 | { |
| 73 | try elf_file.reportParseError2( | 73 | try elf_file.reportParseError2( |
| 74 | self.index, | 74 | self.index, |
src/link/Elf/SharedObject.zig+1-1| ... | @@ -63,7 +63,7 @@ pub fn parse(self: *SharedObject, elf_file: *Elf) !void { | ... | @@ -63,7 +63,7 @@ pub fn parse(self: *SharedObject, elf_file: *Elf) !void { |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | if (self.data.len < self.header.?.e_shoff or | 65 | if (self.data.len < self.header.?.e_shoff or |
| 66 | self.data.len < self.header.?.e_shoff + self.header.?.e_shnum * @sizeOf(elf.Elf64_Shdr)) | 66 | self.data.len < self.header.?.e_shoff + @as(u64, @intCast(self.header.?.e_shnum)) * @sizeOf(elf.Elf64_Shdr)) |
| 67 | { | 67 | { |
| 68 | try elf_file.reportParseError2( | 68 | try elf_file.reportParseError2( |
| 69 | self.index, | 69 | self.index, |