[PATCH] D64507: [BitcodeReader] Validate OpNum, before accessing Record array.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 10 10:05:11 PDT 2019
fhahn marked an inline comment as done.
fhahn added inline comments.
================
Comment at: llvm/lib/Bitcode/Reader/BitcodeReader.cpp:4169
+ if (OpNum >= Record.size())
+ return error("Invalid record");
+
----------------
jfb wrote:
> Could you provide more info than "invalid record"?
Sure, although I am not sure what level of detail would be appropriate, as the error itself does not provide any context to the user besides the message.
How about `Invalid record: operand number exceeded available operands`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64507/new/
https://reviews.llvm.org/D64507
More information about the llvm-commits
mailing list