commit | a43813b85eb34cf2f1475c494e7f78b47ceb65ee | [log] [tgz] |
---|---|---|
author | George Rimar <grimar@accesssoftek.com> | Mon Oct 17 10:06:44 2016 +0000 |
committer | George Rimar <grimar@accesssoftek.com> | Mon Oct 17 10:06:44 2016 +0000 |
tree | ddb71d5f10eb9c5c86c35a43e679b03829a39bf4 | |
parent | b98736371202355ee336bc6816d1cec80a336e9b [diff] |
[Object/ELF] - Check that e_shnum is null when e_shoff is. Spec says (http://www.sco.com/developers/gabi/1998-04-29/ch4.eheader.html) : e_shnum This member holds the number of entries in the section header table. Thus the product of e_shentsize and e_shnum gives the section header table's size in bytes. If a file has no section header table, e_shnum holds the value zero. Revealed using "id_000037,sig_11,src_000015,op_havoc,rep_8" from PR30540 That was the reason of crash in lld on incorrect input file. Binary reduced using afl-min. Differential revision: https://reviews.llvm.org/D25090 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284371 91177308-0d34-0410-b5e6-96231b3b80d8