Skip to content
Snippets Groups Projects
Commit 2d224509 authored by Michael J. Spencer's avatar Michael J. Spencer
Browse files

[Writer][ELF] Use correct data types for sizes. Fixes integer overflow bug.

This only happens when the section header count is > 1024.

llvm-svn: 176747
parent 593eeb00
No related branches found
No related tags found
No related merge requests found
......@@ -259,13 +259,13 @@ public:
void finalize() {}
inline uint16_t fileSize() { return sizeof(Elf_Shdr) * _sectionInfo.size(); }
inline uint64_t fileSize() { return sizeof(Elf_Shdr) * _sectionInfo.size(); }
inline int64_t entsize() {
inline uint64_t entsize() {
return sizeof(Elf_Shdr);
}
inline int64_t numHeaders() {
inline uint64_t numHeaders() {
return _sectionInfo.size();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment