[FFmpeg-cvslog] ffmpeg: check avpicture_get_size() retuen value
Michael Niedermayer
git at videolan.org
Tue Oct 23 00:29:35 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Oct 23 00:22:23 2012 +0200| [3318d6b940986c92259c5e8ba1f0038ae6aab9f1] | committer: Michael Niedermayer
ffmpeg: check avpicture_get_size() retuen value
Fixes CID205018
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3318d6b940986c92259c5e8ba1f0038ae6aab9f1
---
ffmpeg.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ffmpeg.c b/ffmpeg.c
index 46e128a..a0e41bd 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -664,6 +664,8 @@ static void pre_process_video_frame(InputStream *ist, AVPicture *picture, void *
/* create temporary picture */
size = avpicture_get_size(dec->pix_fmt, dec->width, dec->height);
+ if (size < 0)
+ return;
buf = av_malloc(size);
if (!buf)
return;
More information about the ffmpeg-cvslog
mailing list