diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-26 04:27:23 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-26 04:27:53 +0100 |
commit | c8f25cafd2f23662bcb1e62965c0c42d6989688a (patch) | |
tree | 5adc8737f6f1e1305c78752bdb56a7904db37a26 | |
parent | 66daebc9d50d8095bb067138168e57b6a1880a19 (diff) | |
download | ffmpeg-c8f25cafd2f23662bcb1e62965c0c42d6989688a.tar.gz |
atrac3: fix buffer size for get_bits.
Fixes out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/atrac3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c index 84c5c11fca..1e54784a8d 100644 --- a/libavcodec/atrac3.c +++ b/libavcodec/atrac3.c @@ -740,7 +740,7 @@ static int decode_frame(AVCodecContext *avctx, const uint8_t *databuf, /* set the bitstream reader at the start of the second Sound Unit*/ - init_get_bits(&q->gb, ptr1, avctx->block_align * 8); + init_get_bits8(&q->gb, ptr1, q->decoded_bytes_buffer + avctx->block_align - ptr1); /* Fill the Weighting coeffs delay buffer */ memmove(q->weighting_delay, &q->weighting_delay[2], |