1
0
mirror of https://github.com/mstorsjo/fdk-aac.git synced 2025-03-12 22:00:03 +01:00

Make sure there are enough bits when reading ADTS header.

This commit is contained in:
Doug Benedict 2017-09-20 14:30:42 -07:00
parent a3d1168943
commit e2e35b8273

View File

@ -185,6 +185,9 @@ TRANSPORTDEC_ERROR adtsRead_DecodeHeader(
#endif
valBits = FDKgetValidBits(hBs);
if (valBits < ADTS_HEADERLENGTH) {
return TRANSPORTDEC_NOT_ENOUGH_BITS;
}
/* adts_fixed_header */
bs.mpeg_id = FDKreadBits(hBs, Adts_Length_Id);