Make sure the CastInst is valid before trying to create it
authorFilipe Cabecinhas <me@filcab.net>
Tue, 6 Oct 2015 12:37:54 +0000 (12:37 +0000)
committerFilipe Cabecinhas <me@filcab.net>
Tue, 6 Oct 2015 12:37:54 +0000 (12:37 +0000)
commitfdb28cdd8b6bfe412382225adcb9cac0c3a8467b
tree059ea5fef610fc67f4451d17ac69667a9dbb10fa
parentb0c38394ffddb3916be295b22e7629cd58494182
Make sure the CastInst is valid before trying to create it

Bug found with afl-fuzz.

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