Skip to content

Commit

Permalink
Fix UB in CQuorumBlockProcessor::GetCommitmentsFromBlock.
Browse files Browse the repository at this point in the history
  • Loading branch information
sproxet committed Sep 22, 2022
1 parent 75effb4 commit d8b701c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/llmq/quorums_blockprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,8 @@ bool CQuorumBlockProcessor::GetCommitmentsFromBlock(const CBlock& block, const C
return state.DoS(100, false, REJECT_INVALID, "bad-qc-dup");
}

ret.emplace((Consensus::LLMQType)qc.commitment.llmqType, std::move(qc.commitment));
auto temp = (Consensus::LLMQType) qc.commitment.llmqType;
ret.emplace(temp, qc.commitment);
}
}

Expand Down

0 comments on commit d8b701c

Please sign in to comment.