[FFmpeg-cvslog] rv34: Avoid NULL dereference on corrupted bitstream

Laurent Aimar git at videolan.org
Thu Nov 3 03:57:38 CET 2011


ffmpeg | branch: release/0.5 | Laurent Aimar <fenrir at videolan.org> | Sat Sep 17 23:43:58 2011 +0200| [ef93642aac0ddf17ecd35e3a1e463a5e7f4f9ac5] | committer: Michael Niedermayer

rv34: Avoid NULL dereference on corrupted bitstream

rv34_decode_slice() can return without allocating any pictures.

Signed-off-by: Martin Storsjö <martin at martin.st>
(cherry picked from commit d0f6ab0298f2309c6104626787ed73416298b019)

Signed-off-by: Anton Khirnov <anton at khirnov.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ef93642aac0ddf17ecd35e3a1e463a5e7f4f9ac5
---

 libavcodec/rv34.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c
index 4d8d968..3c0e519 100644
--- a/libavcodec/rv34.c
+++ b/libavcodec/rv34.c
@@ -1452,7 +1452,7 @@ int ff_rv34_decode_frame(AVCodecContext *avctx,
             break;
     }
 
-    if(last){
+    if(last && s->current_picture_ptr){
         if(r->loop_filter)
             r->loop_filter(r, s->mb_height - 1);
         ff_er_frame_end(s);



More information about the ffmpeg-cvslog mailing list