shithub: openh264

Download patch

ref: 642e50ba2e55b4cb61dd6d340c17dfdafe0194a3
parent: 4bc0b8ad188cf373e3224e9471963c116816fea6
author: xiaotiansf <xiaotianshimail@gmail.com>
date: Fri Nov 1 07:41:06 EDT 2019

fix issue 3193 (fuzz 18644) by adding missing initialization of PPicture's refPic lists

--- a/codec/decoder/core/src/decoder_core.cpp
+++ b/codec/decoder/core/src/decoder_core.cpp
@@ -2614,6 +2614,8 @@
         memset (pCtx->sMb.pSliceIdc[i], 0xff, (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int32_t)));
       memset (pCtx->pCurDqLayer->pMbCorrectlyDecodedFlag, 0, pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight * sizeof (bool));
       memset (pCtx->pCurDqLayer->pMbRefConcealedFlag, 0, pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight * sizeof (bool));
+      memset (pCtx->pDec->pRefPic[LIST_0], 0, sizeof (PPicture) * 17);
+      memset (pCtx->pDec->pRefPic[LIST_1], 0, sizeof (PPicture) * 17);
       pCtx->pDec->iMbNum = pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight;
       pCtx->pDec->iMbEcedNum = 0;
       pCtx->pDec->iMbEcedPropNum = 0;