]> granicus.if.org Git - llvm/commit
[Object/ELF] - Do not crash if string table sh_size is equal to zero.
authorGeorge Rimar <grimar@accesssoftek.com>
Thu, 27 Oct 2016 11:41:57 +0000 (11:41 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Thu, 27 Oct 2016 11:41:57 +0000 (11:41 +0000)
commit2bbde38ea6f99c814405544d13de4ca3e9f997d4
tree266c86af77f3016342b51923f914407d493104d0
parent1341f74f938218f835e8bffaf6ba133bdf4341aa
[Object/ELF] - Do not crash if string table sh_size is equal to zero.

Revealed using "id_000038,sig_11,src_000015,op_havoc,rep_16" from PR30540,
when sh_size was 0, crash happened.

Differential revision: https://reviews.llvm.org/D25091

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285282 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/ELF.h
test/Object/Inputs/invalid-strtab-zero-size.elf [new file with mode: 0644]
test/Object/invalid.test