Check that we have a valid PointerType element type before calling get()
authorFilipe Cabecinhas <me@filcab.net>
Wed, 29 Apr 2015 02:27:28 +0000 (02:27 +0000)
committerFilipe Cabecinhas <me@filcab.net>
Wed, 29 Apr 2015 02:27:28 +0000 (02:27 +0000)
commit99ebc9e0046475e40d4d72c0c13612331786664a
treef19e9a4e91c7ab6b2f1c9d25ee66692d8618b6a0
parent5c9b6dbb73c55a7858cc2afd637ee267d2c18e70
Check that we have a valid PointerType element type before calling get()

Same as r236073 but for PointerType.

Bug found with AFL fuzz.

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