Browse Source

fix exploitable buffer overflow

Originally committed as revision 8850 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer 19 years ago
parent
commit
9f1473b304
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/dca.c

+ 3
- 0
libavcodec/dca.c View File

@@ -1089,6 +1089,9 @@ static int dca_convert_bitstream(uint8_t * src, int src_size, uint8_t * dst,
uint16_t *ssrc = (uint16_t *) src, *sdst = (uint16_t *) dst;
PutBitContext pb;

if((unsigned)src_size > (unsigned)max_size)
return -1;

mrk = AV_RB32(src);
switch (mrk) {
case DCA_MARKER_RAW_BE:


Loading…
Cancel
Save