[Bitstream] Check that there is enough space for blob
authorNikita Popov <npopov@redhat.com>
Mon, 7 Feb 2022 10:43:29 +0000 (11:43 +0100)
committerNikita Popov <npopov@redhat.com>
Mon, 7 Feb 2022 11:16:13 +0000 (12:16 +0100)
commitec18030f5fc1f4a08326e65fe06c6f265a829f4c
tree31fa1514db2008f643374fac1c83fffacf833622
parent89017772d9a7dc66398227fe23a9f8a1f5fabda3
[Bitstream] Check that there is enough space for blob

Instead of simply assuming that it will be zero. I double checked
that the bitstream reader doesn't have any special handling for
all-zero blobs, it will always write out the full contents.
llvm/lib/Bitstream/Reader/BitstreamReader.cpp
llvm/test/Bitcode/invalid.test