Browse Source

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>
tags/n1.2
Michael Niedermayer 12 years ago
parent
commit
c8f25cafd2
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/atrac3.c

+ 1
- 1
libavcodec/atrac3.c View File

@@ -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],


Loading…
Cancel
Save