Next set of additional error checks for invalid Mach-O files for bad load commands
authorKevin Enderby <enderby@apple.com>
Tue, 13 Sep 2016 21:42:28 +0000 (21:42 +0000)
committerKevin Enderby <enderby@apple.com>
Tue, 13 Sep 2016 21:42:28 +0000 (21:42 +0000)
commitf76b56cb9c711e147ebb0407f153a0c4f38cd644
tree04c8125834bf84454886e52334c19503fe1f86d7
parent9918cb65736a69a141bba65e33e4a56f313681e4
Next set of additional error checks for invalid Mach-O files for bad load commands
that use the Mach::dyld_info_command type for the load commands that are
currently use in the MachOObjectFile constructor.

This contains the missing checks for LC_DYLD_INFO and
LC_DYLD_INFO_ONLY load commands and the fields for the
Mach::dyld_info_command type.

llvm-svn: 281400
15 files changed:
llvm/lib/Object/MachOObjectFile.cpp
llvm/test/Object/Inputs/macho-invalid-dyldinfo-bind_off-bind_size [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-dyldinfo-export_off-export_size [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-dyldinfo-lazy_bind_off-lazy_bind_size [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-dyldinfo-more-than-one [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-dyldinfo-rebase_off [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-dyldinfo-rebase_off-rebase_size [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-dyldinfo-small [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-dyldinfo-weak_bind_off-weak_bind_size [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-dyldinfoonly-bad-size [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-dyldinfoonly-bind_off [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-dyldinfoonly-export_off [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-dyldinfoonly-lazy_bind_off [new file with mode: 0644]
llvm/test/Object/Inputs/macho-invalid-dyldinfoonly-weak_bind_off [new file with mode: 0644]
llvm/test/Object/macho-invalid.test