diff options
author | Doug Benedict <doub@cypress.com> | 2017-09-20 14:30:42 -0700 |
---|---|---|
committer | Doug Benedict <doub@cypress.com> | 2017-09-20 14:30:42 -0700 |
commit | e2e35b82738dc9d5e5229477d49d557cadad4dc7 (patch) | |
tree | 2a9b84a28303a1007c29762ffa2a2c64b97cb51c /libMpegTPDec | |
parent | a3d11689433a046ad57add8ea22dedceb2fe722d (diff) | |
download | fdk-aac-e2e35b82738dc9d5e5229477d49d557cadad4dc7.tar.gz fdk-aac-e2e35b82738dc9d5e5229477d49d557cadad4dc7.tar.bz2 fdk-aac-e2e35b82738dc9d5e5229477d49d557cadad4dc7.zip |
Make sure there are enough bits when reading ADTS header.
Diffstat (limited to 'libMpegTPDec')
-rw-r--r-- | libMpegTPDec/src/tpdec_adts.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libMpegTPDec/src/tpdec_adts.cpp b/libMpegTPDec/src/tpdec_adts.cpp index c455681..934fbc8 100644 --- a/libMpegTPDec/src/tpdec_adts.cpp +++ b/libMpegTPDec/src/tpdec_adts.cpp @@ -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); |