[Object/ELF] - Do not allow overflow when checking section size/offset.
authorGeorge Rimar <grimar@accesssoftek.com>
Thu, 27 Oct 2016 11:44:56 +0000 (11:44 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Thu, 27 Oct 2016 11:44:56 +0000 (11:44 +0000)
commit7aa1626898d79438b440129e352883a630dee8b5
tree390fb01b433edbbd18e3d684b5401ba066308918
parentdf0d75edf640995563f6e3b4fe13f03272a364a7
[Object/ELF] - Do not allow overflow when checking section size/offset.

Overflow was the reason of incorrect passing the check,
patch fixes the case.

Differentail revision: https://reviews.llvm.org/D25514

llvm-svn: 285284
llvm/include/llvm/Object/ELF.h
llvm/test/Object/Inputs/invalid-section-size2.elf [new file with mode: 0644]
llvm/test/Object/invalid.test