From: Justin Ruggles Date: Fri, 23 Sep 2011 23:22:06 +0000 (-0400) Subject: tta: check for extradata allocation failure in tta demuxer X-Git-Tag: v0.8b1~926 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f540ca22c5fb4504d959c295f55591a9ec2a8859;p=platform%2Fupstream%2Flibav.git tta: check for extradata allocation failure in tta demuxer --- diff --git a/libavformat/tta.c b/libavformat/tta.c index 87174c1..9efcd1d 100644 --- a/libavformat/tta.c +++ b/libavformat/tta.c @@ -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);