Skip to content

Commit

Permalink
tta: check for extradata allocation failure in tta demuxer
Browse files Browse the repository at this point in the history
  • Loading branch information
justinruggles committed Oct 25, 2011
1 parent 2f1d212 commit f540ca2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libavformat/tta.c
Expand Up @@ -107,6 +107,10 @@ static int tta_read_header(AVFormatContext *s, AVFormatParameters *ap)
return -1;
}
st->codec->extradata = av_mallocz(st->codec->extradata_size+FF_INPUT_BUFFER_PADDING_SIZE);
if (!st->codec->extradata) {
st->codec->extradata_size = 0;
return AVERROR(ENOMEM);
}
avio_seek(s->pb, start_offset, SEEK_SET);
avio_read(s->pb, st->codec->extradata, st->codec->extradata_size);

Expand Down

0 comments on commit f540ca2

Please sign in to comment.