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)
commit3b4a565b8a5848acd94fbe4c184d5ef2b6b15860
tree983056ec6587328e2f2fe04596d275395e6ff4c5
parent2d6f83dac906479f9012d1846a3ed2d39966a67a
Make sure that isValidElementType(Type) before calling {Array,Struct}Type::get(Type)

Bug found with AFL fuzz.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236073 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Bitcode/Reader/BitcodeReader.cpp
test/Bitcode/Inputs/invalid-array-element-type.bc [new file with mode: 0644]
test/Bitcode/Inputs/invalid-vector-element-type.bc [new file with mode: 0644]
test/Bitcode/invalid.test