mirror of https://github.com/mstorsjo/fdk-aac.git
Make sure there are enough bits when reading ADTS header.
This commit is contained in:
parent
b51c73991c
commit
944114bb04
|
@ -181,6 +181,9 @@ TRANSPORTDEC_ERROR adtsRead_DecodeHeader(HANDLE_ADTS pAdts,
|
||||||
FDKmemcpy(&oldPce, &pAsc->m_progrConfigElement, sizeof(CProgramConfig));
|
FDKmemcpy(&oldPce, &pAsc->m_progrConfigElement, sizeof(CProgramConfig));
|
||||||
|
|
||||||
valBits = FDKgetValidBits(hBs);
|
valBits = FDKgetValidBits(hBs);
|
||||||
|
if (valBits < ADTS_HEADERLENGTH) {
|
||||||
|
return TRANSPORTDEC_NOT_ENOUGH_BITS;
|
||||||
|
}
|
||||||
|
|
||||||
/* adts_fixed_header */
|
/* adts_fixed_header */
|
||||||
bs.mpeg_id = FDKreadBits(hBs, Adts_Length_Id);
|
bs.mpeg_id = FDKreadBits(hBs, Adts_Length_Id);
|
||||||
|
|
Loading…
Reference in New Issue