Recommit rr366796 "[Object/ELF.h] - Improve testing of the fields in ELFFile<ELFT...
authorGeorge Rimar <grimar@accesssoftek.com>
Wed, 24 Jul 2019 11:24:37 +0000 (11:24 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Wed, 24 Jul 2019 11:24:37 +0000 (11:24 +0000)
commitec10d5c6c10cc7749f06e49359407907687fd771
tree4bfb73951296c00c6ea763eed1441faa8f242084
parentb9d96ceca0c54496d93f0d58bef2968cde5b1edd
Recommit rr366796 "[Object/ELF.h] - Improve testing of the fields in ELFFile<ELFT>::sections()."

With a fix of the issue found by UBSan.

Original commit message:

This eliminates a one error untested and
also introduces a error for one more possible case
which lead to crash previously.

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

llvm-svn: 366886
llvm/include/llvm/Object/ELF.h
llvm/include/llvm/ObjectYAML/ELFYAML.h
llvm/test/Object/invalid.test
llvm/tools/yaml2obj/yaml2elf.cpp