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 Dec 6, 2022
1 parent 75effb4 commit 40ce1d2
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 llmqTypeTemp = (Consensus::LLMQType)qc.commitment.llmqType;
ret.emplace(llmqTypeTemp, std::move(qc.commitment));
}
}

Expand Down

0 comments on commit 40ce1d2

Please sign in to comment.