Check bit widths before trying to get a type.
authorFilipe Cabecinhas <me@filcab.net>
Fri, 30 Jan 2015 18:13:50 +0000 (18:13 +0000)
committerFilipe Cabecinhas <me@filcab.net>
Fri, 30 Jan 2015 18:13:50 +0000 (18:13 +0000)
commitfcd044b692653de5e79502e556cb652b8867b77f
treea3bd52f59956c92cadae12131be0311d1b4a8d4d
parent709c0a16bbd4ec7dbe1f684f36a861f044f2fc9e
Check bit widths before trying to get a type.

Added a test case for it.
Also added run lines for the test case in r227566.

Bugs found with afl-fuzz

llvm-svn: 227589
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/test/Bitcode/Inputs/invalid-bitwidth.bc [new file with mode: 0644]
llvm/test/Bitcode/invalid.test