Skip to content
Snippets Groups Projects
Commit b44c3e1b authored by Karsten Suehring's avatar Karsten Suehring
Browse files

Merge branch 'fixsegfault2' into 'master'

Fix out-of-bounds access in EncCu::updateRdCheckingNum

See merge request !2699
parents c1128cd2 d3c4409d
No related branches found
No related tags found
1 merge request!2699Fix out-of-bounds access in EncCu::updateRdCheckingNum
Pipeline #11578 passed
...@@ -2871,6 +2871,8 @@ double EncCu::calcLumaCost4MergePrediction(const TempCtx& ctxStart, const PelUni ...@@ -2871,6 +2871,8 @@ double EncCu::calcLumaCost4MergePrediction(const TempCtx& ctxStart, const PelUni
unsigned int EncCu::updateRdCheckingNum(double threshold, unsigned int numMergeSatdCand) unsigned int EncCu::updateRdCheckingNum(double threshold, unsigned int numMergeSatdCand)
{ {
numMergeSatdCand = std::min(numMergeSatdCand, (unsigned int) m_mergeItemList.size());
for (uint32_t i = 0; i < numMergeSatdCand; i++) for (uint32_t i = 0; i < numMergeSatdCand; i++)
{ {
const auto mergeItem = m_mergeItemList.getMergeItemInList(i); const auto mergeItem = m_mergeItemList.getMergeItemInList(i);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment