[FFmpeg-cvslog] Avoid NULL dereference on corrupted bitstream with real decoder.

Laurent Aimar git at videolan.org
Wed Sep 21 21:08:39 CEST 2011


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

Avoid NULL dereference on corrupted bitstream with real decoder.

rv34_decode_slice() can return without allocating any pictures.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 140dbcff357351570426efd0e0bc00e380f5436e)

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

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

diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c
index 0e5f868..9196c95 100644
--- a/libavcodec/rv34.c
+++ b/libavcodec/rv34.c
@@ -1498,7 +1498,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