Skip to content

Commit

Permalink
Initialize member Instruction::index_.
Browse files Browse the repository at this point in the history
Reported as unitialized when used here:
http://google3/wireless/android/security/exploits/stasys/dataflow_evaluator.cc?l=799&rcl=419853748

Found using:
-Xclang -enable-noundef-analysis
-mllvm -msan-eager-checks=1

PiperOrigin-RevId: 420954999
Change-Id: I9b182ef3201ef6ef1b13d8925a64c0da6352fc89
  • Loading branch information
BinExport Authors authored and copybara-github committed Jan 11, 2022
1 parent 5326478 commit ef50561
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reader/instruction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
namespace security::binexport {

Instruction::Instruction(Address address, const std::string& mnemonic)
: address_(address), mnemonic_(mnemonic) {}
: address_(address), mnemonic_(mnemonic), index_(0) {}

void Instruction::set_operands(const std::vector<int>& operand_indices) {
operand_indices_ = operand_indices;
Expand Down

0 comments on commit ef50561

Please sign in to comment.