History

Fix oss-fuzz newly reported bug 14267. reset reference's references after call DecreasePicBuff when new sequence arrives

xiaotiansf committed 7 years ago

Commit 45056411 parent 7a1edba1 file · +8 −0Browse files

Showing the changes to codec/decoder/core/src/decoder.cpp (1 of 1 file). Show all

Unified · Split

codec/decoder/core/src/decoder.cpp+8−0
@@ -228,6 +228,14 @@ static int32_t DecreasePicBuff (PWelsDecoderContext pCtx, PPicBuff* ppPicBuf, co · 227 unmodified lines
228228 pPicNewBuf->ppPic[i]->uiRefCount = 0;
229229 pPicNewBuf->ppPic[i]->bAvailableFlag = true;
230230 pPicNewBuf->ppPic[i]->bIsComplete = false;
231+ //remove references
232+ for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) {
233+ uint32_t i = 0;
234+ while (i < MAX_DPB_COUNT && pPicNewBuf->ppPic[i]->pRefPic[listIdx][i]) {
235+ pPicNewBuf->ppPic[i]->pRefPic[listIdx][i] = 0;
236+ ++i;
237+ }
238+ }
231239 }
232240 // remove old PicBuf
233241 if (pPicOldBuf->ppPic != NULL) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t