Merge pull request #2069 from huili2/bugfix_rplr_num_overflow

prevent error RPLR number overflow case
This commit is contained in:
HaiboZhu 2015-08-11 17:26:46 +08:00
commit d7b344f18d

View File

@ -197,7 +197,8 @@ int32_t WelsReorderRefList (PWelsDecoderContext pCtx) {
}
if (pRefPicListReorderSyn->bRefPicListReorderingFlag[LIST_0]) {
while (pRefPicListReorderSyn->sReorderingSyn[LIST_0][iReorderingIndex].uiReorderingOfPicNumsIdc != 3) {
while ((iReorderingIndex < iMaxRefIdx)
&& (pRefPicListReorderSyn->sReorderingSyn[LIST_0][iReorderingIndex].uiReorderingOfPicNumsIdc != 3)) {
uint16_t uiReorderingOfPicNumsIdc =
pRefPicListReorderSyn->sReorderingSyn[LIST_0][iReorderingIndex].uiReorderingOfPicNumsIdc;
if (uiReorderingOfPicNumsIdc < 2) {