Browse Source

asfdec: check extradata size before alloc and read

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.1
Michael Niedermayer 13 years ago
parent
commit
80aa89bdff
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/asfdec.c

+ 1
- 1
libavformat/asfdec.c View File

@@ -444,7 +444,7 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size)
tag1 = avio_rl32(pb);
avio_skip(pb, 20);
if (sizeX > 40) {
st->codec->extradata_size = sizeX - 40;
st->codec->extradata_size = ffio_limit(pb, sizeX - 40);
st->codec->extradata = av_mallocz(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
avio_read(pb, st->codec->extradata, st->codec->extradata_size);
}


Loading…
Cancel
Save