ref: 8859924de039ce06cffddf97fd3fe342012bec82
parent: 0fefca2d859c2fc056a49917538c7850057cc22e
author: xiaotiansf <[email protected]>
date: Mon Feb 4 16:39:43 EST 2019
Fix Bugzilla reported bug-1525097.
--- a/codec/decoder/core/src/decoder_core.cpp
+++ b/codec/decoder/core/src/decoder_core.cpp
@@ -2652,7 +2652,7 @@
pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t) * MB_BLOCK4x4_NUM);
for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
uint32_t i = 0;
- while (pCtx->sRefPic.pRefList[listIdx][i]) {
+ while (pCtx->sRefPic.pRefList[listIdx][i] && i < MAX_DPB_COUNT) {
pCtx->pDec->pRefPic[listIdx][i] = pCtx->sRefPic.pRefList[listIdx][i];
++i;
}