[FFmpeg-cvslog] error_concealment: avoid using the picture if not fully setup
Michael Niedermayer
git at videolan.org
Fri Aug 8 16:16:45 CEST 2014
ffmpeg | branch: release/1.1 | Michael Niedermayer <michaelni at gmx.at> | Wed Aug 6 18:19:57 2014 +0100| [52254067b312e78d30bbe79fc33dbdf995b22b4e] | committer: Anton Khirnov
error_concealment: avoid using the picture if not fully setup
Fixes state becoming inconsistent and a null pointer dereference.
CC: libav-stable at libav.org
Bug-Id: CVE-2013-0860
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=52254067b312e78d30bbe79fc33dbdf995b22b4e
---
libavcodec/error_resilience.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
index ae9ef68..73b69af 100644
--- a/libavcodec/error_resilience.c
+++ b/libavcodec/error_resilience.c
@@ -896,6 +896,12 @@ void ff_er_frame_end(MpegEncContext *s)
return;
};
+ if (s->picture_structure == PICT_FRAME &&
+ s->current_picture.f.linesize[0] != s->current_picture_ptr->f.linesize[0]) {
+ av_log(s->avctx, AV_LOG_ERROR, "Error concealment not possible, frame not fully initialized\n");
+ return;
+ }
+
if (s->current_picture.f.motion_val[0] == NULL) {
av_log(s->avctx, AV_LOG_ERROR, "Warning MVs not available\n");
More information about the ffmpeg-cvslog
mailing list