Make sure that isValidElementType(Type) before calling {Array,Struct}Type::get(Type)
authorFilipe Cabecinhas <me@filcab.net>
Wed, 29 Apr 2015 01:27:01 +0000 (01:27 +0000)
committerFilipe Cabecinhas <me@filcab.net>
Wed, 29 Apr 2015 01:27:01 +0000 (01:27 +0000)
commitf15fb032efeb9da81f3ca341879b3eccea98b1b6
tree83c5377aa61d7c3a6860ecc3674710d2bd9f3552
parent180b92168dd61c0d6c61eaa241c3c21bd892a19b
Make sure that isValidElementType(Type) before calling {Array,Struct}Type::get(Type)

Bug found with AFL fuzz.

llvm-svn: 236073
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/test/Bitcode/Inputs/invalid-array-element-type.bc [new file with mode: 0644]
llvm/test/Bitcode/Inputs/invalid-vector-element-type.bc [new file with mode: 0644]
llvm/test/Bitcode/invalid.test