Browse Source

Check data_size in decode_frame_mp3on4().

backported r19987 by michael


Originally committed as revision 21717 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
tags/v0.5.1
Reinhard Tartler 16 years ago
parent
commit
4b360ee2ca
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/mpegaudiodec.c

+ 3
- 0
libavcodec/mpegaudiodec.c View File

@@ -2473,6 +2473,9 @@ static int decode_frame_mp3on4(AVCodecContext * avctx,
OUT_INT *outptr, *bp;
int fr, j, n;

if(*data_size < MPA_FRAME_SIZE * MPA_MAX_CHANNELS * s->frames * sizeof(OUT_INT))
return -1;

*data_size = 0;
// Discard too short frames
if (buf_size < HEADER_SIZE)


Loading…
Cancel
Save