(1) add protection for golomb GetUe output value

(2) change the max length of cabac bypass to 16
This commit is contained in:
Haibo Zhu
2015-10-18 20:12:34 -07:00
parent fb61733b27
commit 9ba2c9825c
3 changed files with 15 additions and 17 deletions

View File

@@ -273,8 +273,8 @@ int32_t DecodeExpBypassCabac (PWelsCabacDecEngine pDecEngine, int32_t iCount, ui
iSymTmp += (1 << iCount);
++iCount;
}
} while (uiCode != 0 && iCount != 31);
if (iCount == 31) {
} while (uiCode != 0 && iCount != 16);
if (iCount == 16) {
return ERR_CABAC_UNEXPECTED_VALUE;
}