[FFmpeg-cvslog] tta: check for extradata allocation failure in tta demuxer
Justin Ruggles
git at videolan.org
Wed Oct 26 02:46:29 CEST 2011
ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Fri Sep 23 19:22:06 2011 -0400| [f540ca22c5fb4504d959c295f55591a9ec2a8859] | committer: Justin Ruggles
tta: check for extradata allocation failure in tta demuxer
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f540ca22c5fb4504d959c295f55591a9ec2a8859
---
libavformat/tta.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
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);
More information about the ffmpeg-cvslog
mailing list