From a70a20d41e13f94d9546937745848eaf3f8cb237 Mon Sep 17 00:00:00 2001 From: Andrew Calvano Date: Mon, 25 Sep 2023 11:28:16 -0700 Subject: [PATCH] Fix out of bound read in WelsDec::NeedErrorCon --- codec/decoder/core/src/error_concealment.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codec/decoder/core/src/error_concealment.cpp b/codec/decoder/core/src/error_concealment.cpp index 5e10af1f7..2067ffdce 100644 --- a/codec/decoder/core/src/error_concealment.cpp +++ b/codec/decoder/core/src/error_concealment.cpp @@ -452,7 +452,7 @@ int32_t MarkECFrameAsRef (PWelsDecoderContext pCtx) { bool NeedErrorCon (PWelsDecoderContext pCtx) { bool bNeedEC = false; - int32_t iMbNum = pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight; + int32_t iMbNum = pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight; for (int32_t i = 0; i < iMbNum; ++i) { if (!pCtx->pCurDqLayer->pMbCorrectlyDecodedFlag[i]) { bNeedEC = true;