Merge pull request #2380 from mstorsjo/fix-slice-realloc
Avoid reading iCountMbNumInSlice out of bounds on slice realloc
This commit is contained in:
commit
7e88b13809
@ -4877,7 +4877,7 @@ int32_t SliceBufferRealloc (sWelsEncCtx* pCtx) {
|
||||
pSliceIdx->sSlicingOverRc.iTotalQpSlice = 0;
|
||||
pSliceIdx->sSlicingOverRc.iTotalMbSlice = 0;
|
||||
pSliceIdx->sSlicingOverRc.iTargetBitsSlice = WELS_DIV_ROUND (kiBitsPerMb *
|
||||
pCurLayer->sLayerInfo.pSliceInLayer[uiSliceIdx].iCountMbNumInSlice,
|
||||
pSlice[uiSliceIdx].iCountMbNumInSlice,
|
||||
INT_MULTIPLY);
|
||||
pSliceIdx->sSlicingOverRc.iFrameBitsSlice = 0;
|
||||
pSliceIdx->sSlicingOverRc.iGomBitsSlice = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user