diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-17 05:02:11 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-12-17 05:04:56 +0100 |
commit | f37b2d5a6884c7bea87a6c7454239381449bd637 (patch) | |
tree | ea12352ecca9c15a992dac5028c64e12e66aaafa /libavcodec | |
parent | 4d70023a2a83c5c7690708a5a5acfe8ac8ed8f19 (diff) | |
download | ffmpeg-streaming-f37b2d5a6884c7bea87a6c7454239381449bd637.zip ffmpeg-streaming-f37b2d5a6884c7bea87a6c7454239381449bd637.tar.gz |
aacdec: Fix null pointer crash
Fixes bug170
Bug found by: Gautam Gupta
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpeg4audio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mpeg4audio.c b/libavcodec/mpeg4audio.c index 6744593..abd3fa4 100644 --- a/libavcodec/mpeg4audio.c +++ b/libavcodec/mpeg4audio.c @@ -82,6 +82,9 @@ int avpriv_mpeg4audio_get_config(MPEG4AudioConfig *c, const uint8_t *buf, GetBitContext gb; int specific_config_bitindex; + if(bit_size<=0) + return AVERROR_INVALIDDATA; + init_get_bits(&gb, buf, bit_size); c->object_type = get_object_type(&gb); c->sample_rate = get_sample_rate(&gb, &c->sampling_index); |