[FFmpeg-cvslog] lavf/utils.c: Avoid a null pointer dereference on oom after duration_error allocation.
Carl Eugen Hoyos
git at videolan.org
Thu Jul 11 12:13:23 CEST 2013
ffmpeg | branch: release/2.0 | Carl Eugen Hoyos <cehoyos at ag.or.at> | Wed Jul 10 13:15:57 2013 +0200| [fc3dec8b626f8c00fb89d1e66fdfbe9a021ca604] | committer: Michael Niedermayer
lavf/utils.c: Avoid a null pointer dereference on oom after duration_error allocation.
(cherry picked from commit c9eb5c9751c88caaed62af5ffe908fe545022e7e)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fc3dec8b626f8c00fb89d1e66fdfbe9a021ca604
---
libavformat/utils.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index bdee644..070c224 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2859,6 +2859,8 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
if (!st->info->duration_error)
st->info->duration_error = av_mallocz(sizeof(st->info->duration_error[0])*2);
+ if (!st->info->duration_error)
+ return AVERROR(ENOMEM);
// if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
// av_log(NULL, AV_LOG_ERROR, "%f\n", dts);
More information about the ffmpeg-cvslog
mailing list