diff options
author | George Rimar <grimar@accesssoftek.com> | 2016-10-27 11:50:04 +0000 |
---|---|---|
committer | George Rimar <grimar@accesssoftek.com> | 2016-10-27 11:50:04 +0000 |
commit | 447d1a19860bd8af26275a21ec67ce5c70f533d5 (patch) | |
tree | e18b3e7f1e5fbada88a8d9a447c9087dc552e423 /llvm/test/Object/invalid.test | |
parent | 7aa1626898d79438b440129e352883a630dee8b5 (diff) | |
download | bcm5719-llvm-447d1a19860bd8af26275a21ec67ce5c70f533d5.tar.gz bcm5719-llvm-447d1a19860bd8af26275a21ec67ce5c70f533d5.zip |
[Object/ELF] - Fixed behavior when SectionHeaderTable->sh_size is too large.
Elf.h already has code checking that section table does not go past end of file.
Problem is that this check may not work on values greater than UINT64_MAX / Header->e_shentsize
because of calculation overflow.
Parch fixes the issue.
Differential revision: https://reviews.llvm.org/D25432
llvm-svn: 285285
Diffstat (limited to 'llvm/test/Object/invalid.test')
-rw-r--r-- | llvm/test/Object/invalid.test | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/test/Object/invalid.test b/llvm/test/Object/invalid.test index a0016fef9d5..dd431aa3a55 100644 --- a/llvm/test/Object/invalid.test +++ b/llvm/test/Object/invalid.test @@ -76,3 +76,6 @@ INVALID-SEC-ADDRESS-ALIGNMENT: Invalid data was encountered while parsing the fi RUN: not llvm-readobj -t %p/Inputs/invalid-section-size2.elf 2>&1 | \ RUN: FileCheck --check-prefix=INVALID-SECTION-SIZE2 %s INVALID-SECTION-SIZE2: Invalid data was encountered while parsing the file. + +RUN: not llvm-readobj -t %p/Inputs/invalid-sections-num.elf 2>&1 | FileCheck --check-prefix=INVALID-SECTION-NUM %s +INVALID-SECTION-NUM: Invalid data was encountered while parsing the file. |