[FFmpeg-cvslog] latmdec: Check AudioSpecificConfig length before decoding extradata.

Alex Converse git at videolan.org
Fri Jan 13 01:41:21 CET 2012


ffmpeg | branch: master | Alex Converse <alex.converse at gmail.com> | Wed Jan 11 14:03:57 2012 -0800| [b5fc571e4f730579f328ae9cf77435cb7fddc53d] | committer: Alex Converse

latmdec: Check AudioSpecificConfig length before decoding extradata.

This is different than a normal get_bits() over read because
decode_audio_specific_config() creates its own GetBitContext.

Fixes Bug 170.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b5fc571e4f730579f328ae9cf77435cb7fddc53d
---

 libavcodec/aacdec.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index b2fc740..ca1a876 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -2363,6 +2363,8 @@ static int latm_decode_audio_specific_config(struct LATMContext *latmctx,
                                "config not byte aligned.\n", 1);
         return AVERROR_INVALIDDATA;
     }
+    if (asclen <= 0)
+        return AVERROR_INVALIDDATA;
     bits_consumed = decode_audio_specific_config(NULL, avctx, &m4ac,
                                          gb->buffer + (config_start_bit / 8),
                                          asclen, sync_extension);



More information about the ffmpeg-cvslog mailing list