[FFmpeg-cvslog] tta: check for extradata allocation failure in tta demuxer
Justin Ruggles
git at videolan.org
Fri Nov 4 13:22:23 CET 2011
ffmpeg | branch: release/0.8 | Justin Ruggles <justin.ruggles at gmail.com> | Fri Sep 23 19:22:06 2011 -0400| [241f15f1c93f5bd661a187e42644220fd89ea7de] | committer: Michael Niedermayer
tta: check for extradata allocation failure in tta demuxer
(cherry picked from commit f540ca22c5fb4504d959c295f55591a9ec2a8859)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=241f15f1c93f5bd661a187e42644220fd89ea7de
---
libavformat/tta.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/libavformat/tta.c b/libavformat/tta.c
index c37039d..9df9763 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