| author | |
| committer | |
| log | 0299ed50361fbe3b279f9894119ded14439b7dc4 |
| tree | 8086035530e8a1ca6126d7527d67600ec86606b9 |
| parent | 9bcb432a0efc47b76e6110813119c8b899020301 |
1 files changed, 2 insertions(+), 1 deletions(-)
src/link/Elf.zig+2-1| ... | ... | @@ -5003,7 +5003,8 @@ fn writeSyntheticSectionsObject(self: *Elf) !void { |
| 5003 | 5003 | |
| 5004 | 5004 | const shdr = self.shdrs.items[sec.shndx]; |
| 5005 | 5005 | |
| 5006 | const num_relocs = @divExact(shdr.sh_size, shdr.sh_entsize); | |
| 5006 | const num_relocs = math.cast(usize, @divExact(shdr.sh_size, shdr.sh_entsize)) orelse | |
| 5007 | return error.Overflow; | |
| 5007 | 5008 | var relocs = try std.ArrayList(elf.Elf64_Rela).initCapacity(gpa, num_relocs); |
| 5008 | 5009 | defer relocs.deinit(); |
| 5009 | 5010 |