Skip to content

Commit ef50561

Browse files
BinExport Authorscopybara-github
authored andcommitted
Initialize member Instruction::index_.
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
1 parent 5326478 commit ef50561

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

reader/instruction.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
namespace security::binexport {
1818

1919
Instruction::Instruction(Address address, const std::string& mnemonic)
20-
: address_(address), mnemonic_(mnemonic) {}
20+
: address_(address), mnemonic_(mnemonic), index_(0) {}
2121

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

0 commit comments

Comments
 (0)