ref: 7e88b138096a0d9d6dbf98647a1b278b4b154300
parent: 040974f7355a2829ada1fe7451bead94eaa6aec1
parent: 69e3fac093855203084ea0f770ffb137989d1621
author: sijchen <sijchen@cisco.com>
date: Fri Feb 26 04:46:13 EST 2016
Merge pull request #2380 from mstorsjo/fix-slice-realloc Avoid reading iCountMbNumInSlice out of bounds on slice realloc
--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -4877,7 +4877,7 @@
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;