Browse Source

Do not decode more data than output buffer may hold

Originally committed as revision 10547 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Kostya Shishkov 18 years ago
parent
commit
675a0583b4
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/dsicinav.c

+ 2
- 0
libavcodec/dsicinav.c View File

@@ -317,6 +317,8 @@ static int cinaudio_decode_frame(AVCodecContext *avctx,
uint8_t *src = buf;
int16_t *samples = (int16_t *)data;

buf_size = FFMIN(buf_size, *data_size/2);

if (cin->initial_decode_frame) {
cin->initial_decode_frame = 0;
cin->delta = (int16_t)AV_RL16(src); src += 2;


Loading…
Cancel
Save