Skip to content

Commit

Permalink
fix Issue 44848 in oss-fuzz: openh264:decoder_fuzzer: Index-out-of-bo…
Browse files Browse the repository at this point in the history
…unds in WelsDec::WelsInitRefList (cisco#3499)
  • Loading branch information
xiaotiansf authored Mar 14, 2022
1 parent 27d06a2 commit 5e02a73
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion codec/decoder/core/src/manage_dec_ref.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,9 @@ static int32_t AddLongTermToList (PRefPic pRefPic, PPicture pPic, int32_t iLongT
pRefPic->pLongRefList[LIST_0][i] = pPic;
}

pRefPic->uiLongRefCount[LIST_0]++;
if (pRefPic->uiLongRefCount[LIST_0] < MAX_REF_PIC_COUNT) {
pRefPic->uiLongRefCount[LIST_0]++;
}
return ERR_NONE;
}

Expand Down

0 comments on commit 5e02a73

Please sign in to comment.