Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-17 08:02:11 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-12-17 08:04:56 +0400
commitf37b2d5a6884c7bea87a6c7454239381449bd637 (patch)
treeea12352ecca9c15a992dac5028c64e12e66aaafa /libavcodec/mpeg4audio.c
parent4d70023a2a83c5c7690708a5a5acfe8ac8ed8f19 (diff)
aacdec: Fix null pointer crash
Fixes bug170 Bug found by: Gautam Gupta Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpeg4audio.c')
-rw-r--r--libavcodec/mpeg4audio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mpeg4audio.c b/libavcodec/mpeg4audio.c
index 67445935c4..abd3fa4a9b 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);